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

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

Issue 1758913002: Add instantiate method on ParameterizedType and InterfaceType. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 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
Index: pkg/analyzer/lib/src/generated/type_system.dart
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index 9a4590ebe47711752b0bb93fa89d14a492027134..940ee83c5ef5dffe18db9aee9a9083c89518fb2c 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -481,9 +481,7 @@ abstract class TypeSystem {
* no instantiation is done.
*/
DartType instantiateType(DartType type, List<DartType> typeArguments) {
- if (type is InterfaceTypeImpl) {
- return type.substitute4(typeArguments);
- } else if (type is FunctionTypeImpl) {
+ if (type is ParameterizedType) {
return type.instantiate(typeArguments);
} else {
return type;
« no previous file with comments | « pkg/analyzer/lib/src/generated/testing/test_type_provider.dart ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698