Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1161)

Unified Diff: pkg/analyzer/lib/src/task/strong/checker.dart

Issue 2807103003: Fix compilation errors (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/strong/checker.dart
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index 8d3c9a275ee0b59f6333d51a4969ef8b8e1e700d..6f9d81c8142b2e57e67c5c36be1d519ea15f6d29 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -843,7 +843,7 @@ class CodeChecker extends RecursiveAstVisitor {
} else {
// Future<T> -> FutureOr<T>
var typeArg = (type.element == typeProvider.futureType.element)
- ? type.typeArguments[0]
+ ? (type as InterfaceType).typeArguments[0]
: typeProvider.dynamicType;
return typeProvider.futureOrType.instantiate([typeArg]);
}
@@ -930,7 +930,7 @@ class CodeChecker extends RecursiveAstVisitor {
// Special case for FutureOr to handle returned values from async functions.
// In this case, we're more permissive than assignability.
if (to.element == typeProvider.futureOrType.element) {
- var to1 = to.typeArguments[0];
+ var to1 = (to as InterfaceType).typeArguments[0];
var to2 = typeProvider.futureType.instantiate([to1]);
return _needsImplicitCast(expr, to1, from: from) == true ||
_needsImplicitCast(expr, to2, from: from) == true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698