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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java

Issue 18140005: Report TYPE_ALIAS_CANNOT_REFERENCE_ITSELF (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: tweak Created 7 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
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
index 5f69fdd810b05f5a8353ea86e77561a04c6509cc..99d7254d6d849b743d7cc3d9ae77e35eacbb36f2 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
@@ -2209,6 +2209,17 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_typeAliasCannotReferenceItself_returnClass_withTypeAlias() throws Exception {
+ Source source = addSource(createSource(//
+ "typedef B A();",
+ "class B {",
+ " A a;",
+ "}"));
+ resolve(source);
+ assertNoErrors();
+ verify(source);
+ }
+
public void test_typeArgumentNotMatchingBounds_const() throws Exception {
Source source = addSource(createSource(//
"class A {}",

Powered by Google App Engine
This is Rietveld 408576698