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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java

Issue 10543089: Issue 3344. Support for 'U extends T' type variables (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « compiler/java/com/google/dart/compiler/type/Types.java ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index b3e498d4e88539f60561cb5ace3a37a8c0cea491..6c989975dd4722de90235ad06a31e7d628496fa0 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -2203,6 +2203,25 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
assertErrors(libraryResult.getErrors());
}
+ /**
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=3344
+ */
+ public void test_typeVariableExtendsTypeVariable() throws Exception {
+ AnalyzeLibraryResult libraryResult = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A<T, U extends T> {",
+ " f1(U u) {",
+ " T t = u;",
+ " }",
+ " f2(T t) {",
+ " U u = t;",
+ " }",
+ "}",
+ "");
+ assertErrors(libraryResult.getErrors());
+ }
+
private AnalyzeLibraryResult analyzeLibrary(String... lines) throws Exception {
return analyzeLibrary(getName(), makeCode(lines));
}
« no previous file with comments | « compiler/java/com/google/dart/compiler/type/Types.java ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698