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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java

Issue 231473002: Fix for 16078- clarifications on the StaticWarningCode.FUNCTION_WITHOUT_CALL warning (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java
index a7ee53fcfd18853dc15ae424c912b1b41e4dfadf..b058cac3248492b403512f8e8e37e52254fbad37 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java
@@ -5391,6 +5391,10 @@ public class ErrorVerifier extends RecursiveAstVisitor<Void> {
if (!classElement.getType().isSubtypeOf(typeProvider.getFunctionType())) {
return false;
}
+ // If there is a noSuchMethod method, then don't report the warning, see dartbug.com/16078
+ if (classElement.getMethod(ElementResolver.NO_SUCH_METHOD_METHOD_NAME) != null) {
+ return false;
+ }
ExecutableElement callMethod = inheritanceManager.lookupMember(classElement, "call");
if (callMethod == null || !(callMethod instanceof MethodElement)
|| ((MethodElement) callMethod).isAbstract()) {
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698