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

Issue 15500002: Checkpoint for more inheritance error codes 'Missing inherited member' warnings. (Closed)

Created:
7 years, 7 months ago by jwren
Modified:
7 years, 7 months ago
CC:
reviews_dartlang.org, lukeechurch_googlemail.com, ericarnold
Visibility:
Public.

Description

Checkpoint for more inheritance error codes 'Missing inherited member' warnings. Added isAbstract to the PropertyAccessorElement R=brianwilkerson@google.com, scheglov@google.com Committed: https://code.google.com/p/dart/source/detail?r=22949

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Test nit cleanup #

Total comments: 12

Patch Set 4 : Rebase with bleeding_edge and cleanup. #

Patch Set 5 : Rebase with bleeding_edge #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+436 lines, -38 lines) Patch
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/PropertyAccessorElement.java View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java View 1 chunk +9 lines, -2 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/builder/ElementBuilder.java View 1 2 3 3 chunks +5 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/PropertyAccessorElementImpl.java View 2 chunks +14 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/handle/PropertyAccessorElementHandle.java View 1 chunk +5 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/member/PropertyAccessorMember.java View 1 chunk +5 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/InheritanceManager.java View 1 chunk +10 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java View 1 2 3 6 chunks +138 lines, -12 lines 3 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/builder/ElementBuilderTest.java View 1 2 3 2 chunks +138 lines, -0 lines 0 comments Download
M editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java View 1 2 2 chunks +104 lines, -24 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
jwren
7 years, 7 months ago (2013-05-20 22:04:38 UTC) #1
Brian Wilkerson
LGTM https://codereview.chromium.org/15500002/diff/22/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/PropertyAccessorElement.java File editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/PropertyAccessorElement.java (right): https://codereview.chromium.org/15500002/diff/22/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/PropertyAccessorElement.java#newcode43 editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/PropertyAccessorElement.java:43: * Return {@code true} if this method is ...
7 years, 7 months ago (2013-05-20 22:51:49 UTC) #2
scheglov
lgtm
7 years, 7 months ago (2013-05-20 22:54:23 UTC) #3
jwren
https://codereview.chromium.org/15500002/diff/22/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/PropertyAccessorElement.java File editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/PropertyAccessorElement.java (right): https://codereview.chromium.org/15500002/diff/22/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/PropertyAccessorElement.java#newcode43 editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/PropertyAccessorElement.java:43: * Return {@code true} if this method is abstract. ...
7 years, 7 months ago (2013-05-21 18:21:30 UTC) #4
jwren
Committed patchset #5 manually as r22949 (presubmit successful).
7 years, 7 months ago (2013-05-21 18:26:19 UTC) #5
Brian Wilkerson
7 years, 7 months ago (2013-05-21 18:38:25 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/15500002/diff/14001/editor/tools/plugins/com....
File
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java
(right):

https://codereview.chromium.org/15500002/diff/14001/editor/tools/plugins/com....
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java:811:
methodsInEnclosingClass.add(method.getName());
I think you only want to add the names of non-static members.

https://codereview.chromium.org/15500002/diff/14001/editor/tools/plugins/com....
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java:828:
boolean foundOverridingMethod = false;
Note that neither the variable nor the 'if' is necessary. The condition
"!foundOverridingMethod" could be replaced by
"!methodsInEnclosingClass.contains(methodName)".

https://codereview.chromium.org/15500002/diff/14001/editor/tools/plugins/com....
editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java:864:
if (elt instanceof MethodElement && !((MethodElement) elt).isAbstract()) {
Do we want to include the test for isAbstract()? Consider the following case:

abstract class A { void m(); }
abstract class B { void m(); }
class C extends A implements B {}

I think that with the test for isAbstract() the verifier will produce two errors
while without it only one error will be produced. I think one error is better.

Powered by Google App Engine
This is Rietveld 408576698