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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java

Issue 10873096: Issue 3904. Allow using class literal in expressions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
index c84b61afdd502adbd0faa4b7ff6d61a722bdf897..7f520b1bbd752c56ff097c1581de71e413a52051 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
@@ -180,6 +180,7 @@ abstract class ResolverTestCase extends TestCase {
private final InterfaceType dynamicType;
private final InterfaceType defaultMapLiteralType;
private final InterfaceType defaultListType;
+ private final InterfaceType typeType;
private final Type voidType;
private final ClassElement objectElement;
@@ -220,6 +221,10 @@ abstract class ResolverTestCase extends TestCase {
ClassElement listElement = Elements.classNamed("List");
defaultListType = Types.interfaceType(listElement, Lists.<Type>newArrayList(dynamicType));
listElement.setType(defaultListType);
+
+ ClassElement typeElement = Elements.classNamed("Type");
+ typeType = Types.interfaceType(typeElement, Collections.<Type>emptyList());
+ listElement.setType(defaultListType);
voidType = Types.newVoidType();
}
@@ -317,6 +322,11 @@ abstract class ResolverTestCase extends TestCase {
public InterfaceType getIteratorType(Type elementType) {
throw new AssertionError();
}
+
+ @Override
+ public InterfaceType getTypeType() {
+ return typeType;
+ }
}
protected static DartTypeNode makeType(String name, String... arguments) {

Powered by Google App Engine
This is Rietveld 408576698