标签: scala compiler-errors compilation value-class
当我将包装器定义为值类(扩展AnyVal)时:
$newCars = array_slice($cars, 1)
wrapperHolder出现以下编译错误:
class Wrapper(val string: String) extends AnyVal def wrapperHolder(w: Wrapper): {def wrapper: Wrapper} = new { def wrapper: Wrapper = w }