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

Unified Diff: compiler/javatests/com/google/dart/compiler/CompilerTestCase.java

Issue 9049016: in dartc, generics in Typedef not working as expected, when extending generic type (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged up to r3100 Created 8 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
Index: compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
diff --git a/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java b/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
index 02f7c585394122a9230030383fd1318efd4f880a..3fa1139a0867705e807de9bd93d67d0e69c9fecd 100644
--- a/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
+++ b/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
@@ -8,6 +8,7 @@ import static com.google.dart.compiler.common.ErrorExpectation.assertErrors;
import com.google.common.collect.Lists;
import com.google.dart.compiler.CommandLineOptions.CompilerOptions;
+import com.google.dart.compiler.ast.DartFunctionTypeAlias;
import com.google.dart.compiler.ast.DartInvocation;
import com.google.dart.compiler.ast.DartNewExpression;
import com.google.dart.compiler.ast.DartNode;
@@ -327,4 +328,18 @@ public abstract class CompilerTestCase extends TestCase {
});
return result[0];
}
+
+ protected static DartFunctionTypeAlias findTypedef(DartNode rootNode, final String name) {
+ final DartFunctionTypeAlias result[] = new DartFunctionTypeAlias[1];
+ rootNode.accept(new DartNodeTraverser<Void>() {
+ @Override
+ public Void visitFunctionTypeAlias(DartFunctionTypeAlias node) {
+ if (node.getName().getTargetName().equals(name)) {
+ result[0] = node;
+ }
+ return null;
+ }
+ });
+ return result[0];
+ }
}

Powered by Google App Engine
This is Rietveld 408576698