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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 10928230: Issue 5082. It is an error if argument to '?' is not a formal parameter (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/resolver/Resolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index 5aad16edff76960def1fc0a93d249ce95795639a..f577e91bb62dc51d0a66e9a17bc9094bebb73ae0 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -1989,6 +1989,11 @@ public class Resolver {
break;
}
}
+ if (node.getOperator() == Token.CONDITIONAL) {
+ if (ElementKind.of(argElement) != ElementKind.PARAMETER) {
+ onError(arg, ResolverErrorCode.FORMAL_PARAMETER_NAME_EXPECTED);
+ }
+ }
return null;
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698