Index: compiler/java/com/google/dart/compiler/resolver/Resolver.java |
=================================================================== |
--- compiler/java/com/google/dart/compiler/resolver/Resolver.java (revision 8249) |
+++ compiler/java/com/google/dart/compiler/resolver/Resolver.java (working copy) |
@@ -224,6 +224,23 @@ |
public Element visitFunctionTypeAlias(DartFunctionTypeAlias alias) { |
getContext().pushFunctionAliasScope(alias); |
resolveFunctionAlias(alias); |
+ |
+ List<DartParameter> parameters = alias.getParameters(); |
+ for (DartParameter parameter : parameters) { |
+ assert parameter.getElement() != null; |
+ if (parameter.getQualifier() instanceof DartThisExpression) { |
zundel
2012/06/04 19:23:18
There is also the case 'super'. In fact, I'm not
Brian Wilkerson
2012/06/04 19:32:39
No, it isn't. But as far as I can see the parser w
|
+ onError(parameter.getName(), ResolverErrorCode.PARAMETER_INIT_OUTSIDE_CONSTRUCTOR); |
+ } else { |
+ getContext().declare( |
+ parameter.getElement(), |
+ ResolverErrorCode.DUPLICATE_PARAMETER, |
+ ResolverErrorCode.DUPLICATE_PARAMETER_WARNING); |
+ } |
+ if (parameter.getDefaultExpr() != null) { |
+ onError(parameter.getDefaultExpr(), ResolverErrorCode.DEFAULT_VALUE_IN_TYPEDEF); |
+ } |
+ } |
+ |
getContext().popScope(); |
return null; |
} |