Index: pkg/analyzer/lib/src/summary/link.dart |
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart |
index 7bfbed1de4168e81c39c01b1e95a1538e8de67d5..5c8aff672d2ba7c76eceb4a78d21bfab2083421e 100644 |
--- a/pkg/analyzer/lib/src/summary/link.dart |
+++ b/pkg/analyzer/lib/src/summary/link.dart |
@@ -2228,6 +2228,9 @@ class ExprTypeComputer { |
case UnlinkedExprOperation.assignToIndex: |
_doAssignToIndex(); |
break; |
+ case UnlinkedExprOperation.await: |
+ _doAwait(); |
+ break; |
case UnlinkedExprOperation.extractIndex: |
_doExtractIndex(); |
break; |
@@ -2363,6 +2366,14 @@ class ExprTypeComputer { |
} |
} |
+ void _doAwait() { |
+ DartType type = stack.removeLast(); |
+ DartType typeArgument = linker.typeSystem |
+ .mostSpecificTypeArgument(type, linker.typeProvider.futureType); |
+ typeArgument = _dynamicIfNull(typeArgument); |
+ stack.add(typeArgument); |
Paul Berry
2016/11/29 19:15:57
Do we need to flatten futures here? The spec says
scheglov
2016/11/29 19:39:13
Done.
|
+ } |
+ |
void _doConditional() { |
DartType elseType = stack.removeLast(); |
DartType thenType = stack.removeLast(); |
@@ -3413,10 +3424,10 @@ abstract class LibraryElementForLink< |
_linkedLibrary.importDependencies.map(_getDependency).toList(); |
@override |
- bool get isDartAsync => _absoluteUri == 'dart:async'; |
+ bool get isDartAsync => _absoluteUri.toString() == 'dart:async'; |
@override |
- bool get isDartCore => _absoluteUri == 'dart:core'; |
+ bool get isDartCore => _absoluteUri.toString() == 'dart:core'; |
/** |
* If this library is part of the build unit being linked, return the library |