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

Side by Side Diff: tests/language/src/CyclicTypeVariableTest.dart

Issue 10248007: test rename overhaul: step 8 - language tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Tests cyclic reference to type variables in type expressions
6
7 class Base<T> {}
8
9 class Derived extends Base<Derived> {} // legal
10
11 typedef void funcType<T
12 extends T /// 01: static type warning
13 >(T arg);
14
15 class DerivedFunc extends Base<funcType<DerivedFunc>> { }
16
17
18 interface A<S
19 extends S /// 02: static type warning
20 > {
21 S field;
22 }
23
24 interface B<U extends Base<U>> { // legal
25 U field;
26 }
27
28 class C1<V
29 extends V /// 03: static type warning
30 > {
31 V field;
32 }
33
34 class C2<V
35 extends V /// 04: static type warning
36 > implements A<V> {
37 V field;
38 }
39
40 class D1<W extends Base<W>> { // legal
41 W field;
42 }
43
44 class D2<W extends Base<W>> implements B<W>{ // legal
45 W field;
46 }
47
48 class E<X extends Base<funcType<X>>> { // legal
49
50 X field;
51 }
52
53 main() {
54 new C1<int>();
55 new C2<int>();
56 new D1<Derived>();
57 new D2<Derived>();
58 new E<DerivedFunc>();
59 funcType<Object> val = null;
60 }
OLDNEW
« no previous file with comments | « tests/language/src/CyclicImportTest.dart ('k') | tests/language/src/DefaultClassImplicitConstructorTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698