【发布时间】:2017-08-29 20:13:32
【问题描述】:
将播放框架从 2.5 升级到 2.6 后出现以下错误。 (它能够用 2.5 编译) 斯卡拉版本:2.11.8
ambiguous reference to overloaded definition,
[error] both method emailAddress in trait Constraints of type => play.api.data.validation.Constraint[String]
[error] and method emailAddress in trait Constraints of type (errorMessage: String)play.api.data.validation.Constraint[String]
[error] match argument types (String)
[error] Constraints.emailAddress("test@sample.com")
^
有什么方法可以在 Play 2.6 中使用 Constraints 下的方法吗?
import play.api.data.validation._
val result = Constraints.emailAddress("test@sample.com")
【问题讨论】:
标签: scala playframework