Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Issue 9982003: Make sure toplevel final fields are initialized (Closed)

Created:
8 years, 8 months ago by zundel
Modified:
8 years, 8 months ago
Reviewers:
scheglov
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -7 lines) Patch
M compiler/java/com/google/dart/compiler/resolver/Resolver.java View 2 chunks +3 lines, -5 lines 2 comments Download
M compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java View 1 chunk +1 line, -0 lines 2 comments Download
M compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java View 1 chunk +21 lines, -0 lines 0 comments Download
M tests/co19/co19-compiler.status View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
zundel
8 years, 8 months ago (2012-04-04 15:08:00 UTC) #1
scheglov
LGTM https://chromiumcodereview.appspot.com/9982003/diff/1/compiler/java/com/google/dart/compiler/resolver/Resolver.java File compiler/java/com/google/dart/compiler/resolver/Resolver.java (left): https://chromiumcodereview.appspot.com/9982003/diff/1/compiler/java/com/google/dart/compiler/resolver/Resolver.java#oldcode642 compiler/java/com/google/dart/compiler/resolver/Resolver.java:642: modifiers.makeStatic(); We don't set static flag anymore. I ...
8 years, 8 months ago (2012-04-04 15:21:04 UTC) #2
zundel
8 years, 8 months ago (2012-04-04 17:49:31 UTC) #3
https://chromiumcodereview.appspot.com/9982003/diff/1/compiler/java/com/googl...
File compiler/java/com/google/dart/compiler/resolver/Resolver.java (left):

https://chromiumcodereview.appspot.com/9982003/diff/1/compiler/java/com/googl...
compiler/java/com/google/dart/compiler/resolver/Resolver.java:642:
modifiers.makeStatic();
On 2012/04/04 15:21:04, scheglov wrote:
> We don't set static flag anymore.
> I don't know if anybody used it, but if it passes all tests, then OK.

That's just the thing.  This code didn't set anything.  the correct code to do
that would have been

modifiers = modifiers.makeStatic

but then non one tests it, they only tested isStatic which wasn't reset.

I decided to scrap it because it really isn't a static field and I thought that
would just confuse people.

https://chromiumcodereview.appspot.com/9982003/diff/1/compiler/java/com/googl...
File compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
(right):

https://chromiumcodereview.appspot.com/9982003/diff/1/compiler/java/com/googl...
compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java:148:
TOPLEVEL_FINAL_REQUIRES_VALUE("Toplevel final fields must have an initial
value"),
On 2012/04/04 15:21:04, scheglov wrote:
> We used "top-level" in the other places.

Done.

Powered by Google App Engine
This is Rietveld 408576698