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

Unified Diff: tests/language/cyclic_typedef_test.dart

Issue 27019003: Update check for cyclic typedefs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 2 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 | « sdk/lib/_internal/compiler/implementation/warnings.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/cyclic_typedef_test.dart
diff --git a/tests/language/cyclic_typedef_test.dart b/tests/language/cyclic_typedef_test.dart
index 61d8d0b8704d7d8cb05acf499ec6eed15f8ac7ed..c660527612e59c82a7a6be058ab9b2639d78f624 100644
--- a/tests/language/cyclic_typedef_test.dart
+++ b/tests/language/cyclic_typedef_test.dart
@@ -13,6 +13,12 @@ A /// 01: compile-time error
A // The name of the typedef
+// Cyclic through type variable bound.
+<T extends A> /// 10: compile-time error
+
+// Cyclic through generic type variable bound.
+<T extends List<A>> /// 11: compile-time error
+
( // The left parenthesis of the typedef arguments.
// Cyclic through parameter type.
@@ -39,11 +45,23 @@ B b /// 08: compile-time error
// Cyclic through another more typedefs.
C c /// 09: compile-time error
+// Reference through a class is not a cyclic self-reference.
+Class c /// 12: ok
+
+// Reference through a class type bound is not a cyclic self-reference.
+Class c /// 13: ok
+
); // The right parenthesis of the typedef arguments.
typedef B(A a);
typedef C(B b);
+class Class
+<T extends A> /// 13: continued
+{
+ A a; /// 12: continued
+}
+
void testA(A a) {}
void main() {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/warnings.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698