Chromium Code Reviews

Issue 9122015: Issue 988: Compile time error missing for const class / non-final instance variables (Closed)

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

Description

Issue 988: Compile time error missing for const class / non-final instance variables http://code.google.com/p/dart/issues/detail?id=988 7.5.3: It is a compile-time error if a constant constructor is declared by a class that has a non-final instance variable. The above refers to both locally declared and inherited instance variables. R=mmendez,zundel BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=3108

Patch Set 1 #

Patch Set 2 : line lengths #

Total comments: 4

Patch Set 3 : Nits #

Total comments: 2
Unified diffs Side-by-side diffs Stats (+58 lines, -7 lines)
M compiler/java/com/google/dart/compiler/resolver/Resolver.java View 2 chunks +30 lines, -0 lines 0 comments
M compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java View 1 chunk +3 lines, -1 line 2 comments
M compiler/javatests/com/google/dart/compiler/backend/js/JsFieldAccessOptTest.java View 1 chunk +1 line, -1 line 0 comments
M compiler/javatests/com/google/dart/compiler/backend/js/testFieldAccessExprOpt.dart View 1 chunk +1 line, -1 line 0 comments
M compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java View 2 chunks +21 lines, -1 line 0 comments
M compiler/lib/implementation/regexp.dart View 1 chunk +2 lines, -2 lines 0 comments
M tests/co19/co19-compiler.status View 1 chunk +0 lines, -1 line 0 comments

Messages

Total messages: 5 (0 generated)
codefu
8 years, 11 months ago (2012-01-06 23:06:46 UTC) #1
mmendez
lgtm with nits. http://codereview.chromium.org/9122015/diff/1001/compiler/java/com/google/dart/compiler/resolver/Resolver.java File compiler/java/com/google/dart/compiler/resolver/Resolver.java (right): http://codereview.chromium.org/9122015/diff/1001/compiler/java/com/google/dart/compiler/resolver/Resolver.java#newcode258 compiler/java/com/google/dart/compiler/resolver/Resolver.java:258: constVerifyMembers(classElement.getMembers(), classElement, classElement); Nit: could just ...
8 years, 11 months ago (2012-01-09 16:21:27 UTC) #2
codefu
http://codereview.chromium.org/9122015/diff/1001/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java File compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java (right): http://codereview.chromium.org/9122015/diff/1001/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java#newcode901 compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java:901: "// filler filler filler filler filler filler filler filler ...
8 years, 11 months ago (2012-01-09 16:42:04 UTC) #3
zundel
lgtm http://codereview.chromium.org/9122015/diff/5003/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java File compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java (right): http://codereview.chromium.org/9122015/diff/5003/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java#newcode45 compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java:45: CONST_CLASS_WITH_INHERITED_NONFINAL_FIELDS("Const class %s cannot have non-final, inherited field ...
8 years, 11 months ago (2012-01-09 17:10:00 UTC) #4
codefu
8 years, 11 months ago (2012-01-09 17:57:08 UTC) #5
http://codereview.chromium.org/9122015/diff/5003/compiler/java/com/google/dar...
File compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
(right):

http://codereview.chromium.org/9122015/diff/5003/compiler/java/com/google/dar...
compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java:45:
CONST_CLASS_WITH_INHERITED_NONFINAL_FIELDS("Const class %s cannot have
non-final, inherited field %s from class %s"),
On 2012/01/09 17:10:00, zundel wrote:
> nit, 
> 
> Konstantin and I were talking about this on Friday.  We should standardize on
> whether we want to quote identifier names, and whether or not to use a single
or
> double quote.

I'm fine with single quoted identifiers.  Could do that in a batch commit later.

Powered by Google App Engine