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

Unified Diff: pkg/compiler/lib/src/dart_types.dart

Issue 2598983002: Introduce DartType super hierarchy based on Entity (Closed)
Patch Set: Updated cf. comments. Created 3 years, 11 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/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart_types.dart
diff --git a/pkg/compiler/lib/src/dart_types.dart b/pkg/compiler/lib/src/dart_types.dart
index b151ed99b75193dfdc0ca3a52022f190c841e35f..fc5b81424c6a123251795a5ff00296ffef4d23e2 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -10,6 +10,7 @@ import 'common/resolution.dart' show Resolution;
import 'common.dart';
import 'core_types.dart';
import 'elements/elements.dart';
+import 'elements/types.dart' as types;
import 'elements/modelx.dart' show TypeDeclarationElementX;
import 'ordered_typeset.dart' show OrderedTypeSet;
import 'util/util.dart' show equalElements;
@@ -24,7 +25,7 @@ enum TypeKind {
VOID,
}
-abstract class DartType {
+abstract class DartType implements types.DartType {
String get name;
TypeKind get kind;
@@ -196,7 +197,7 @@ abstract class DartType {
* [: String :] because we must substitute [: String :] for the
* the type variable [: T :].
*/
-class TypeVariableType extends DartType {
+class TypeVariableType extends DartType implements types.TypeVariableType {
final TypeVariableElement element;
TypeVariableType(this.element);
@@ -261,7 +262,7 @@ class MethodTypeVariableType extends TypeVariableType {
get containsMethodTypeVariableType => true;
}
-class VoidType extends DartType {
+class VoidType extends DartType implements types.VoidType {
const VoidType();
TypeKind get kind => TypeKind.VOID;
@@ -467,7 +468,7 @@ abstract class GenericType extends DartType {
}
}
-class InterfaceType extends GenericType {
+class InterfaceType extends GenericType implements types.InterfaceType {
int _hashCode;
InterfaceType(ClassElement element,
@@ -576,7 +577,7 @@ class BadTypedefType extends TypedefType {
}
}
-class FunctionType extends DartType {
+class FunctionType extends DartType implements types.FunctionType {
final FunctionTypedElement element;
final DartType returnType;
final List<DartType> parameterTypes;
@@ -859,7 +860,7 @@ class TypedefType extends GenericType {
/**
* Special type for the `dynamic` type.
*/
-class DynamicType extends DartType {
+class DynamicType extends DartType implements types.DynamicType {
const DynamicType();
Element get element => null;
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698