mkurz / deadbolt-2-scala

Idiomatic Scala API for Deadbolt 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Structural type in DeadboltActionBuilder triggers compiler warnings

mechkg opened this issue · comments

I am trying to update to 2.5.0 and I have encountered the following issue:

This method returning a structural type produces the following warning:

reflective access of structural type member method apply should be enabled by making the implicit value scala.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 Scaladoc for value scala.language.reflectiveCalls for a discussion why the feature should be explicitly enabled.

This seems a bit suspicious (having to resort to reflection is always suspicious...) and I was wondering if there is any reason it cannot be just a normal type (e.g. DeadboltActionBuilderWithHandler) to avoid these complications?