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

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: 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 a6577afc5f3b0f359739cd5e11fc8b6205c58640..a7b872af3a23f155c6e6cd48e2c621e37ab88fbf 100644
--- a/lib/compiler/implementation/resolution/members.dart
+++ b/lib/compiler/implementation/resolution/members.dart
@@ -1699,6 +1699,15 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
world.registerDynamicInvocation(call.name, call);
}
+ if (!Elements.isUnresolved(target)
+ && (target.kind == ElementKind.FUNCTION
+ || target.kind == ElementKind.GENERATIVE_CONSTRUCTOR)
ngeoffray 2012/10/25 11:24:09 Why do you need these kind checks?
karlklose 2012/10/25 13:55:44 I need to be able to compute the signature for the
+ && !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