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

Issue 11369050: Issue 6489. Report error when static method attempts to access const instance field. (Closed)

Created:
8 years, 1 month ago by scheglov
Modified:
8 years, 1 month ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Issue 6489. Report error when static method attempts to access const instance field. http://code.google.com/p/dart/issues/detail?id=6489 R=brianwilkerson@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=14495

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -38 lines) Patch
M compiler/java/com/google/dart/compiler/ast/ASTNodes.java View 2 chunks +4 lines, -4 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java View 4 chunks +2 lines, -17 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/Resolver.java View 1 chunk +4 lines, -1 line 1 comment Download
M compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java View 1 chunk +0 lines, -16 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java View 1 chunk +34 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
scheglov
8 years, 1 month ago (2012-11-02 17:51:14 UTC) #1
Brian Wilkerson
8 years, 1 month ago (2012-11-02 18:01:22 UTC) #2
LGTM

https://codereview.chromium.org/11369050/diff/1/compiler/java/com/google/dart...
File compiler/java/com/google/dart/compiler/resolver/Resolver.java (right):

https://codereview.chromium.org/11369050/diff/1/compiler/java/com/google/dart...
compiler/java/com/google/dart/compiler/resolver/Resolver.java:1241: if
(ASTNodes.isStaticContext(x)) {
Why are we testing this again? Don't we already know that it's true from the
enclosing 'if'?

Powered by Google App Engine
This is Rietveld 408576698