| Index: sdk/lib/_internal/compiler/implementation/types/types.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/types/types.dart (revision 19427)
|
| +++ sdk/lib/_internal/compiler/implementation/types/types.dart (working copy)
|
| @@ -25,6 +25,7 @@
|
| */
|
| abstract class TypesInferrer {
|
| analyzeMain(Element element);
|
| + getConcreteReturnTypeOfElement(Element element);
|
| getConcreteTypeOfElement(Element element);
|
| getConcreteTypeOfNode(Element owner, Node node);
|
| }
|
| @@ -79,8 +80,8 @@
|
| ConcreteType getGuaranteedTypeOfElement(Element element) {
|
| return measure(() {
|
| if (typesInferrer != null) {
|
| - ConcreteType guaranteedType = typesInferrer
|
| - .getConcreteTypeOfElement(element);
|
| + ConcreteType guaranteedType =
|
| + typesInferrer .getConcreteTypeOfElement(element);
|
| if (guaranteedType != null) return guaranteedType;
|
| }
|
| if (!element.isParameter()) return null;
|
| @@ -103,6 +104,17 @@
|
| });
|
| }
|
|
|
| + ConcreteType getGuaranteedReturnTypeOfElement(Element element) {
|
| + return measure(() {
|
| + if (typesInferrer != null) {
|
| + ConcreteType guaranteedType =
|
| + typesInferrer.getConcreteReturnTypeOfElement(element);
|
| + if (guaranteedType != null) return guaranteedType;
|
| + }
|
| + return null;
|
| + });
|
| + }
|
| +
|
| /**
|
| * Return the (inferred) guaranteed concrete type of [node] or null.
|
| * [node] must be an AST node of [owner].
|
|
|