Chromium Code Reviews| Index: pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
| diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
| index 4a03bafed62e2f1b15f56ab4ae039827043fb166..dded10cf912cfde83b588831ba2dcb5e783042ea 100644 |
| --- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
| +++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
| @@ -337,6 +337,16 @@ class TypeInformationSystem extends TypeSystem<TypeInformation> { |
| } |
| } |
| + TypeInformation narrowNotNull(TypeInformation type) { |
| + if (type.type.isExact && !type.type.isNullable) { |
| + return type; |
| + } |
| + TypeInformation newType = |
| + new NarrowTypeInformation(type, dynamicType.type.nonNullable()); |
|
Siggi Cherem (dart-lang)
2015/11/26 02:21:48
would it be incorrect here to use type.type.nonNul
sra1
2015/12/01 02:14:10
I'm not sure what type.type holds at this point fo
|
| + allocatedTypes.add(newType); |
| + return newType; |
| + } |
| + |
| ElementTypeInformation getInferredTypeOf(Element element) { |
| element = element.implementation; |
| return typeInformations.putIfAbsent(element, () { |