Index: lib/compiler/implementation/resolver.dart |
=================================================================== |
--- lib/compiler/implementation/resolver.dart (revision 11792) |
+++ lib/compiler/implementation/resolver.dart (working copy) |
@@ -6,17 +6,20 @@ |
Element operator[](Node node); |
Selector getSelector(Send send); |
DartType getType(TypeAnnotation annotation); |
+ bool isParameterChecked(Element element); |
} |
class TreeElementMapping implements TreeElements { |
- Map<Node, Element> map; |
- Map<Node, Selector> selectors; |
- Map<TypeAnnotation, DartType> types; |
+ final Map<Node, Element> map; |
+ final Map<Node, Selector> selectors; |
+ final Map<TypeAnnotation, DartType> types; |
+ final Set<Element> checkedParameters; |
kasperl
2012/09/04 10:50:08
Thanks for trying to come up with a better name. C
|
TreeElementMapping() |
- : map = new LinkedHashMap<Node, Element>(), |
- selectors = new LinkedHashMap<Node, Selector>(), |
- types = new LinkedHashMap<TypeAnnotation, DartType>(); |
+ : map = new LinkedHashMap<Node, Element>(), |
+ selectors = new LinkedHashMap<Node, Selector>(), |
+ types = new LinkedHashMap<TypeAnnotation, DartType>(), |
+ checkedParameters = new Set<Element>(); |
operator []=(Node node, Element element) => map[node] = element; |
operator [](Node node) => map[node]; |
@@ -33,6 +36,10 @@ |
} |
Selector getSelector(Node node) => selectors[node]; |
+ |
+ bool isParameterChecked(Element element) { |
+ return checkedParameters.contains(element); |
+ } |
} |
class ResolverTask extends CompilerTask { |
@@ -1347,8 +1354,7 @@ |
if (parameter === null || parameter.kind !== ElementKind.PARAMETER) { |
error(node.receiver, MessageKind.PARAMETER_NAME_EXPECTED); |
} else { |
- warning(node, MessageKind.GENERIC, |
- ['argument definition test operator is not implemented.']); |
+ mapping.checkedParameters.add(parameter); |
} |
} |
} |