-
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
[scala.js] Dotty does not produce null/undefined property on anonymous class #14168
Comments
Thanks for the report. I'm starting my vacation today, so I won't be able to look at it in the next two weeks. I think you forgot the definition of |
Added |
This appears to happen only when the type of the Also, I can reproduce this with a named class, local or top-level. So it's also not related to anonymous classes. The situations where this issue pops up are therefore summarized as:
|
Related: constant-value fields are also lost: class Bar extends Foo {
final val extra = "foo"
} |
The culprits are |
Both cases are also problematic for |
@sjrd I also hit this issue when trying to implement an object comparison method like deepEquals(jsObjectA, jsObjectB) in Scala 3 + Scala.js. |
Compiler version
3.1.0
Minimized code
Output
On Scala 2.13.7 and 2.12.15,
However on Scala 3.1.0,
which means
null
orundefined
property on anonymous class is missing.Expectation
All properties should exist even if its value is
null
orundefined
.The text was updated successfully, but these errors were encountered: