Chromium Code Reviews

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: Add TypeSystem.instantiateToDynamic(type) and use it. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/type_system.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/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 4118d8d5d360f48760e75d9957260cc3f6a7c576..540b6a90b65bc5c112559d8c61ff7d00c4908108 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;
+ return context.typeSystem.instantiateToDynamic(bound);
Leaf 2016/09/30 23:44:52 I don't think this is really right for strong mode
}
/**
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/type_system.dart » ('j') | no next file with comments »

Powered by Google App Engine