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

Unified Diff: lib/compiler/implementation/resolution/members.dart

Issue 11273034: Make unmatched static call a runtime error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix a bug. Created 8 years, 2 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
Index: lib/compiler/implementation/resolution/members.dart
diff --git a/lib/compiler/implementation/resolution/members.dart b/lib/compiler/implementation/resolution/members.dart
index 682b6b780163cab837c29d6a92e079badfdb7575..5cea5899ae2ff92d00c4645b2ebe779b4c0377c8 100644
--- a/lib/compiler/implementation/resolution/members.dart
+++ b/lib/compiler/implementation/resolution/members.dart
@@ -1709,6 +1709,13 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
world.registerDynamicInvocation(call.name, call);
}
+ if (Elements.isValid(target) && target.hasSignature()
ngeoffray 2012/10/25 14:21:58 Actually, I'd prefer having the applies method tak
ahe 2012/10/25 15:37:36 I agree.
karlklose 2012/10/26 11:08:48 We only want to warn if the element is known and h
+ && !selector.applies(target, compiler)) {
+ // TODO(karlklose): we can be more precise about the reason of the
+ // mismatch.
+ warning(node, MessageKind.INVALID_ARGUMENTS, [target.name]);
+ }
+
// TODO(ngeoffray): Warn if target is null and the send is
// unqualified.
useElement(node, target);

Powered by Google App Engine
This is Rietveld 408576698