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

Unified Diff: dart/lib/compiler/implementation/typechecker.dart

Issue 11227007: Unify parsing of constructor references. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add asRaw from other CL Created 8 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 | « dart/lib/compiler/implementation/tree/nodes.dart ('k') | dart/tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/typechecker.dart
diff --git a/dart/lib/compiler/implementation/typechecker.dart b/dart/lib/compiler/implementation/typechecker.dart
index 36e176c17aaf4c91eb1e4ac52ad8c605ff248236..ac2025621e8cc9f5f7772f2a091021907f2c24be 100644
--- a/dart/lib/compiler/implementation/typechecker.dart
+++ b/dart/lib/compiler/implementation/typechecker.dart
@@ -70,6 +70,8 @@ abstract class DartType {
abstract DartType unalias(Compiler compiler);
abstract bool operator ==(other);
+
+ DartType asRaw() => this;
}
class TypeVariableType implements DartType {
@@ -186,6 +188,11 @@ class InterfaceType implements DartType {
if (!identical(element, other.element)) return false;
return arguments == other.arguments;
}
+
+ InterfaceType asRaw() {
+ if (arguments.isEmpty) return this;
+ return new InterfaceType(element);
+ }
}
class FunctionType implements DartType {
« no previous file with comments | « dart/lib/compiler/implementation/tree/nodes.dart ('k') | dart/tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698