【发布时间】:2016-05-23 15:29:09
【问题描述】:
我想执行以下操作,但 self-type 行无法编译。这是我的语法错误还是这不可能?
trait A {
def aValue = 1
}
trait B {
def bValue = 1
}
trait C {
a : A, b : B =>
def total = a.aValue + b.bValue
}
class T extends C with A with B { ...
【问题讨论】:
标签: scala