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

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

Issue 10961058: Issue 5302. Type alias type parameters should not conflict with formal parameters (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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/resolver/Resolver.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 98ae0054ae7047136d42a5cd5db3a5f34967ca65..637de3384f23ea7c80584b85ddca353c220b0f36 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -214,6 +214,19 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
errEx(TypeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, 8, 1, 27),
errEx(TypeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, 9, 1, 17));
}
+
+ /**
+ * Type parameters should not conflict with formal parameters.
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=5302
+ */
+ public void test_functionTypeAlias_typePaarameter_scope() throws Exception {
+ AnalyzeLibraryResult libraryResult = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "typedef f<f>(f);",
+ "");
+ assertErrors(libraryResult.getErrors());
+ }
/**
* It is a compile-time error if initializer list contains an initializer for a variable that
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/Resolver.java ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698