Index: pkg/analyzer/lib/src/dart/element/type.dart |
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart |
index 4c3749924ca709a5d4c6998d8c4744f8d3fbbb3c..b9508032f303e2594666ac27e9a59a7b794e72fb 100644 |
--- a/pkg/analyzer/lib/src/dart/element/type.dart |
+++ b/pkg/analyzer/lib/src/dart/element/type.dart |
@@ -1381,6 +1381,15 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType { |
} |
@override |
+ bool get isDartAsyncFutureOr { |
+ ClassElement element = this.element; |
+ if (element == null) { |
+ return false; |
+ } |
+ return element.name == "FutureOr" && element.library.isDartAsync; |
+ } |
+ |
+ @override |
bool get isDartCoreFunction { |
ClassElement element = this.element; |
if (element == null) { |
@@ -2377,6 +2386,9 @@ abstract class TypeImpl implements DartType { |
bool get isDartAsyncFuture => false; |
@override |
+ bool get isDartAsyncFutureOr => false; |
+ |
+ @override |
bool get isDartCoreFunction => false; |
@override |