Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "reflective access of structural type member method should be enabled..." warning mean in Scala?

After switching to Scala 2.10 I get tons of warnings:

reflective access of structural type member method ... should be enabled by making the implicit value language.reflectiveCalls visible

What does it mean?

like image 677
Ivan Avatar asked Nov 12 '12 03:11

Ivan


1 Answers

The warning actually tells where to look in the documentation for an explanation:

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.

Referenced Scaladoc entry (be sure to click the |> arrow to the left to expand the documentation entry).

like image 147
Eugene Burmako Avatar answered Oct 01 '22 01:10

Eugene Burmako