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

Unified Diff: pkg/compiler/lib/src/elements/resolution_types.dart

Issue 2996723002: Support typedef type literals (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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 | « pkg/compiler/lib/src/elements/entities.dart ('k') | pkg/compiler/lib/src/elements/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/resolution_types.dart
diff --git a/pkg/compiler/lib/src/elements/resolution_types.dart b/pkg/compiler/lib/src/elements/resolution_types.dart
index ed970860715e3931f9e0ebb6694878de123581bc..9058e47e645ca88686add395953684db21f36490 100644
--- a/pkg/compiler/lib/src/elements/resolution_types.dart
+++ b/pkg/compiler/lib/src/elements/resolution_types.dart
@@ -866,7 +866,7 @@ class ResolutionFunctionType extends ResolutionDartType
bool _typeContainsMethodTypeVariableType(ResolutionDartType type) =>
type.containsMethodTypeVariableType;
-class ResolutionTypedefType extends GenericType {
+class ResolutionTypedefType extends GenericType implements TypedefType {
ResolutionDartType _unaliased;
ResolutionTypedefType(TypedefElement element,
@@ -888,6 +888,11 @@ class ResolutionTypedefType extends GenericType {
return new ResolutionTypedefType(element, newTypeArguments);
}
+ ResolutionTypedefType subst(covariant List<ResolutionDartType> arguments,
+ covariant List<ResolutionDartType> parameters) {
+ return super.subst(arguments, parameters);
+ }
+
void computeUnaliased(Resolution resolution) {
if (_unaliased == null) {
element.ensureResolved(resolution);
@@ -992,7 +997,7 @@ abstract class ResolutionDartTypeVisitor<R, A> extends DartTypeVisitor<R, A> {
R visitMalformedType(MalformedType type, A argument) => null;
- R visitTypedefType(ResolutionTypedefType type, A argument) => null;
+ R visitTypedefType(TypedefType type, A argument) => null;
}
abstract class BaseResolutionDartTypeVisitor<R, A>
@@ -1011,7 +1016,7 @@ abstract class BaseResolutionDartTypeVisitor<R, A>
visitGenericType(type, argument);
@override
- R visitTypedefType(ResolutionTypedefType type, A argument) =>
+ R visitTypedefType(covariant ResolutionTypedefType type, A argument) =>
visitGenericType(type, argument);
}
@@ -1054,7 +1059,8 @@ abstract class AbstractTypeRelationMixin
/// spurious errors from malformed types.
bool visitMalformedType(MalformedType t, ResolutionDartType s) => true;
- bool visitTypedefType(ResolutionTypedefType t, ResolutionDartType s) =>
+ bool visitTypedefType(
+ covariant ResolutionTypedefType t, ResolutionDartType s) =>
visitType(t, s);
}
« no previous file with comments | « pkg/compiler/lib/src/elements/entities.dart ('k') | pkg/compiler/lib/src/elements/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698