-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
scalajs: compiler crash when overriding Promise.then #12572
Comments
This happens because Scala 3 uses the inferred type of a parameter default value as the result type of the default accessor. This has always been a terrible idea wrt. binary compatibility, but that battle was lost. Now it's biting us because it creates bridges for param accessors in subclasses, and Scala.js handles default accessors in a very special way. We'll need to get rid of those bridges for default accessors in non-native JS classes. |
As of 6fde5c1 this should only happen when the type of the method parameter cannot be used (e.g. |
Hum, then I don't know what causes the bridge to be generated. But the fact is that there is a bridge in this case, and ignoring default getter bridges in JS classes fixes this issue (see PR #12657). |
…idges-in-non-native-js-classes Fix #12572: Ignore default accessor bridges in non-native JS classes.
…sses. They are not emitted, and they are excluded when looking up the default getter to call.
Compiler version
3.0.0
Minimized code
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: