切换到Scala 2.10后,我收到了大量的警告:
结构类型成员方法的反射访问...应该通过使隐式值language.reflectiveCalls可见来启用
这是什么意思?
Eug*_*ako 17
该警告实际上告诉您在文档中查找解释的位置:
Test.scala:9: warning: reflective access of structural type member method y should be enabled
by making the implicit value language.reflectiveCalls visible.
This can be achieved by adding the import clause 'import scala.language.reflectiveCalls'
or by setting the compiler option -language:reflectiveCalls.
See the Scala docs for value scala.language.reflectiveCalls for a discussion
why the feature should be explicitly enabled.
Run Code Online (Sandbox Code Playgroud)
引用Scaladoc条目(确保单击左侧的|>箭头以展开文档条目).