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

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: Remove computeDefaultTypeArgument() and always use TypeSystem.instantiateToBounds(). Created 4 years, 2 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 | pkg/analyzer/lib/src/summary/link.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..9cb2c7b2d3c21b9f42e970e77ee48392ed209d1a 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -8130,21 +8130,6 @@ abstract class TypeParameterizedElementMixin
List<UnlinkedTypeParam> get unlinkedTypeParams;
/**
- * Determine the default value of type argument [i]. in most cases this will
- * be `dynamic`, but sometimes it will be the bound of the ith type parameter.
- */
- DartType computeDefaultTypeArgument(int i) {
- // If strong mode is off, or we can tell quickly from the summary that there
- // is no bound, then the default type argument is `dynamic`; we don't have
- // to call `typeParameters` to find that out.
- if (!context.analysisOptions.strongMode ||
- (unlinkedTypeParams != null && unlinkedTypeParams[i].bound == null)) {
- return DynamicTypeImpl.instance;
- }
- return typeParameters[i].bound ?? DynamicTypeImpl.instance;
- }
-
- /**
* Convert the given [index] into a type parameter type.
*/
TypeParameterType getTypeParameterType(int index) {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/link.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698