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

Unified Diff: pkg/analyzer/lib/src/dart/element/type.dart

Issue 2647833002: fix #28008, fix #28009 implement FutureOr<T> (Closed)
Patch Set: Merge remote-tracking branch 'origin/master' into 28008_futureort Created 3 years, 11 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 | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698