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

Issue 10735039: Issue 3986. Class member cannot have the same name as the class (Closed)

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

Description

Issue 3986. Class member cannot have the same name as the class http://code.google.com/p/dart/issues/detail?id=3986 R=brianwilkerson@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=9577

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -2 lines) Patch
M compiler/java/com/google/dart/compiler/resolver/MemberBuilder.java View 2 chunks +10 lines, -0 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java View 1 chunk +1 line, -0 lines 1 comment Download
M compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java View 1 chunk +2 lines, -2 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java View 1 chunk +22 lines, -0 lines 1 comment Download

Messages

Total messages: 2 (0 generated)
scheglov
8 years, 5 months ago (2012-07-10 22:43:07 UTC) #1
Brian Wilkerson
8 years, 5 months ago (2012-07-11 14:54:15 UTC) #2
LGTM, with or without addressing my comments.

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

https://chromiumcodereview.appspot.com/10735039/diff/1/compiler/java/com/goog...
compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java:152:
MEMBER_WITH_NAME_OF_CLASS("Class member should not have same name as the
enclosing class"),
nit: "same" --> "the same"

https://chromiumcodereview.appspot.com/10735039/diff/1/compiler/javatests/com...
File
compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
(right):

https://chromiumcodereview.appspot.com/10735039/diff/1/compiler/javatests/com...
compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java:1317:
public void test_memberWithNameOfClass() throws Exception {
Consider adding tests for static members. Also, the original case used the
"abstract" modifier to force a member to be parsed as a method rather than a
constructor, which might make C a better test of this issue (given that right
now it's testing a different error case).

Powered by Google App Engine
This is Rietveld 408576698