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

Unified Diff: pkg/analyzer/lib/src/summary/resynthesize.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
Index: pkg/analyzer/lib/src/summary/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 54b585457373b1c739ceaf3424b6de10557cb29c..8fe29d906d01ebbf00f835c3dbc785e46c854c32 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1360,6 +1360,9 @@ class _ResynthesizerContext implements ResynthesizerContext {
_ResynthesizerContext(this._unitResynthesizer);
@override
+ bool get isStrongMode => _unitResynthesizer.summaryResynthesizer.strongMode;
+
+ @override
ElementAnnotationImpl buildAnnotation(ElementImpl context, UnlinkedExpr uc) {
return _unitResynthesizer.buildAnnotation(context, uc);
}
@@ -1737,6 +1740,13 @@ class _UnitResynthesizer {
libraryResynthesizer.getReferencedLocationComponents(
linkedReference.dependency, linkedReference.unit, identifier);
}
+ if (!_resynthesizerContext.isStrongMode &&
+ locationComponents.length == 3 &&
+ locationComponents[0] == 'dart:async' &&
+ locationComponents[2] == 'FutureOr') {
+ type = typeProvider.dynamicType;
+ numTypeParameters = 0;
+ }
ElementLocation location =
new ElementLocationImpl.con3(locationComponents);
if (enclosingInfo != null) {
« no previous file with comments | « pkg/analyzer/lib/src/generated/type_system.dart ('k') | pkg/analyzer/test/generated/analysis_context_factory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698