我在视图包中写了一个简单的 index.scala.html
@import controllers.Application.AuthenticatedRequest
@(posts: Iterator[Post], message: String = "" )(implicit request: AuthenticatedRequest)
.....
错误是:
[error] F:\Kepler\blog\app\views\posts\index.scala.html:2: ')' expected but '='
found.
[error] @(posts: Iterator[Post], message:String = "")(implicit request: Authenti
catedRequest)
[error] ^
我认为将消息默认值设置为“”是正确的方法。任何人都知道为什么这里需要 ')' 而不是 '='