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

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

Issue 2827283002: Implement subtype relation for kernel based elements. (Closed)
Patch Set: Updated cf. comments Created 3 years, 8 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/resolution_types.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/types.dart
diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart
index f8a4a4e899b65e03b60981dd1aea3d218742c431..6e84728e19da76f8102ac9f05b0203ba390667b4 100644
--- a/pkg/compiler/lib/src/elements/types.dart
+++ b/pkg/compiler/lib/src/elements/types.dart
@@ -721,3 +721,19 @@ abstract class PotentialSubtypeVisitor extends SubtypeVisitor {
return super.isSubtype(t, s);
}
}
+
+/// Basic interface for the Dart type system.
+abstract class DartTypes {
+ /// The types defined in 'dart:core'.
+ CommonElements get commonElements;
+
+ /// Returns `true` if [t] is a subtype of [s].
+ bool isSubtype(DartType t, DartType s);
+
+ /// Returns `true` if [t] is assignable to [s].
+ bool isAssignable(DartType t, DartType s);
+
+ /// Returns `true` if [t] might be a subtype of [s] for some values of
+ /// type variables in [s] and [t].
+ bool isPotentialSubtype(DartType t, DartType s);
+}
« no previous file with comments | « pkg/compiler/lib/src/elements/resolution_types.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698