-
Notifications
You must be signed in to change notification settings - Fork 21
Spurious SAM Eta expansion warnings for non-Java interfaces #11644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
* renames for Project fields * Disable eta-sam lint scala/bug#11644 * Enable compiler plugin & macro classloader caching for faster builds (however, this supposedly breaks macros with global mutable state...) scala/scala#6412 https://twitter.com/olafurpg/status/1191299377064824832 > The caching logic for compiler plugins is enabled by default in Bloop and that one does make a difference, around 20/30%, see scala/scala-dev#458 * Don't use -Xsource: since it's not recommended scala/bug#11661 * fix Ybackend-parallelism option * empty `enabled` default parameter for Plugins
I am getting this in @js.native
trait Row extends js.Object {
def getValue(columnId: String): ReactElement = js.native
} If I pass function handle:
|
@evbo it may be useful here for visitors to this ticket to know that Scala 3 has the same problem (if it really is the same!). but if you're interested in seeing it fixed in Scala 3 you'd need to open a ticket at https://github.com/lampepfl/dotty/issues |
Strong opinionated statement from the source at scala/scala3#9135 (comment)
Implementing comment at scala/scala3#5717
Further view on utility of the warning: scala/scala#8941 (comment) That ticket also links to previous discussion scala/scala3#4364. Worth noting that the warning is under
I expected a warning under It would be great if the warning included the warning "category"; this should be easy in Dotty (where it's not yet fully implemented) because of error numbers. The text for the |
What is the root cause of the issue? What is wrong with passing method handle? Would be nice to get a layman's explanation as this is a design pattern I think is concise for scalajs, where you're often passing function handles around (lovingly callback hell). |
@evbo I suggest following Seth's advice and just opening a ticket on dotty for your issue, which I don't know about. |
I'm getting spurious warnings for the following example code with Scala 2.13 &
-Xsource:2.13
:According to
scala -W
,Xlint:eta-sam
warning must fire only for Java-defined interfaces non-annotated , butModuleMake
is a native Scala-defined trait and probably shouldn't trigger the warning.The text was updated successfully, but these errors were encountered: