You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This happens because Scala 3 uses the inferred type of a parameter default value as the result type of the default accessor.
As of 6fde5c1 this should only happen when the type of the method parameter cannot be used (e.g. def foo[T](x: T = 1)), I don't see what else we could do here.
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).
Compiler version
3.0.0
Minimized code
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: