【发布时间】:2011-04-17 22:13:51
【问题描述】:
Object A {
def a = { something}
}
// I've import A, but still have error message: not found: type A
val x = mock[A]
【问题讨论】:
-
(
object,不是Object?适用的更新留给海报) -
object A的类型是A.type。如果你想定义类型A,你需要例如定义class A { /* as now */ },然后定义object A extends A。