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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 2683683002: Prevent null reference when SDK lacks FutureOr<T>. (Closed)
Patch Set: Created 3 years, 10 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/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 8b6fbf711ef55de721391a5ed9a0d6d059222b0f..291f075875960f92c84763b717ef6dde4a47103c 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -9509,12 +9509,12 @@ class TypeProviderImpl extends TypeProviderBase {
_undefinedType = UndefinedTypeImpl.instance;
_futureDynamicType = _futureType.instantiate(<DartType>[_dynamicType]);
_futureNullType = _futureType.instantiate(<DartType>[_nullType]);
- _futureOrNullType = _futureOrType.instantiate(<DartType>[_nullType]);
_iterableDynamicType = _iterableType.instantiate(<DartType>[_dynamicType]);
_streamDynamicType = _streamType.instantiate(<DartType>[_dynamicType]);
// FutureOr<T> is still fairly new, so if we're analyzing an SDK that
// doesn't have it yet, create an element for it.
_futureOrType ??= createPlaceholderFutureOr(_futureType, _objectType);
+ _futureOrNullType = _futureOrType.instantiate(<DartType>[_nullType]);
}
/**
« 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