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

Unified Diff: lib/compiler/implementation/types/concrete_types_inferrer.dart

Issue 10942028: Support class and typedef literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add a comment. 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
Index: lib/compiler/implementation/types/concrete_types_inferrer.dart
diff --git a/lib/compiler/implementation/types/concrete_types_inferrer.dart b/lib/compiler/implementation/types/concrete_types_inferrer.dart
index 8c1b89b37122f8ebf6de46f940085cb0f34d6d94..483d33235eeb19920601bb512b0c74d427279163 100644
--- a/lib/compiler/implementation/types/concrete_types_inferrer.dart
+++ b/lib/compiler/implementation/types/concrete_types_inferrer.dart
@@ -254,6 +254,7 @@ class BaseTypes {
final BaseType listBaseType;
final BaseType mapBaseType;
final BaseType objectBaseType;
+ final BaseType typeBaseType;
BaseTypes(Compiler compiler) :
intBaseType = new ClassBaseType(compiler.intClass),
@@ -262,7 +263,8 @@ class BaseTypes {
stringBaseType = new ClassBaseType(compiler.stringClass),
listBaseType = new ClassBaseType(compiler.listClass),
mapBaseType = new ClassBaseType(compiler.mapClass),
- objectBaseType = new ClassBaseType(compiler.objectClass);
+ objectBaseType = new ClassBaseType(compiler.objectClass),
+ typeBaseType = new ClassBaseType(compiler.typeClass);
}
/**
@@ -1251,4 +1253,8 @@ class TypeInferrerVisitor extends ResolvedVisitor<ConcreteType> {
void internalError(String reason, {Node node}) {
inferrer.fail(node, reason);
}
+
+ ConcreteType visitTypeReferenceSend(Send) {
+ return new ConcreteType.singleton(inferrer.baseTypes.typeBaseType);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698