【发布时间】:2017-06-29 05:49:33
【问题描述】:
我遇到了这种情况。
class Test(a: List[Int])(b: a.type) //This won't compile
def test(a: List[Int])(b: a.type) = ??? //This will compile
有人可以向我解释这是为什么吗?
【问题讨论】:
-
@slouc i.imgur.com/fmbLCEn.png。这是我在控制台中遇到的错误。
-
在 2.11.8 上无法编译
标签: scala methods constructor case-class