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
Fix mixin codegen for an object Foo extends js.Any inside a trait.
The `New` is not enough for an `object class Foo$` that is an inner
JS object. It needs the correct wrapping generated by
`ExplicitJSClasses`. That wrapping exists in the `lazy def` defined
in the trait, but cannot be reproduced in the implementing class.
In general, we need full paths to do that, which are long gone.
When extending a Scala 3-defined trait, we can actually generate
a call to the `lazy def`. Although it was never called before (and
still is never called for non-JS objects), it was always generated
by the Scala 3 compilers.
Scala 2, however, does not emit those `lazy def`s. Since I don't
see a way out (yet), we report an "Implementation restriction"
error in that case.
0 commit comments