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

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

Issue 2376213003: Instantiate parameterized types of type parameters with 'dynamic' type arguments. (Closed)
Patch Set: Created 4 years, 3 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/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 4118d8d5d360f48760e75d9957260cc3f6a7c576..c6c7d4fe4d82e7cadfef394a35a43f8fc5350234 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -8141,7 +8141,8 @@ abstract class TypeParameterizedElementMixin
(unlinkedTypeParams != null && unlinkedTypeParams[i].bound == null)) {
return DynamicTypeImpl.instance;
}
- return typeParameters[i].bound ?? DynamicTypeImpl.instance;
+ DartType bound = typeParameters[i].bound ?? DynamicTypeImpl.instance;
Jennifer Messerly 2016/09/30 00:22:38 there's also resolveToBound on DartType, not sure
+ return new TypeSystemImpl().instantiateToBounds(bound);
Jennifer Messerly 2016/09/30 00:22:38 if we reach this line, we know we're in strongMode
scheglov 2016/09/30 03:42:39 Yes, typeSystem is always StrongTypeSystemImpl in
}
/**
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/link.dart » ('j') | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698