Stephen Haberman has posted comments on this change.
Change subject: Fix non-final field initializers running before the super
cstr.
......................................................................
Patch Set 4:
Okay, I added a test in CompilerTest--I had went looking for where to put
the bug's reproduction before, but didn't find it, and so gave up too early.
What's interesting is that I can't seem to get the "Integer i3 = new
Integer(1)" case to pass.
In the JVM, if the superclass reads this field via a subclass's method, it
sees null. In JS, it sees undefined.
I had thought the fix would be easy, just changing the "push(null)"
statement (which assumes we can skip top-scope init because the subclass's
cstr will do it) to also set the default value, but this causes
strange/spurious-looking failures, like the tests won't even run in
production mode.
So it obviously does not like that, but I'm really puzzled as to how that
would change the semantics. It just adds another preemptive field
assignment to the JS...so fields that were previously undefined for awhile,
then null/assigned, are now more immediately null.
I'm puzzled; can someone else take a look?
--
To view, visit https://gwt-review.googlesource.com/3030
To unsubscribe, visit https://gwt-review.googlesource.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4c8ed0cd718a2188b33cc290fec6071c89be7918
Gerrit-PatchSet: 4
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman <[email protected]>
Gerrit-Reviewer: Leeroy Jenkins <[email protected]>
Gerrit-Reviewer: Matthew Dempsky <[email protected]>
Gerrit-Reviewer: Ray Cromwell <[email protected]>
Gerrit-Reviewer: Roberto Lublinerman <[email protected]>
Gerrit-Reviewer: Stephen Haberman <[email protected]>
Gerrit-HasComments: No
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.