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

Side by Side Diff: tests/language/override_inheritance_generic_test.dart

Issue 140803002: Perform override and inheritance checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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) 2013, 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 class A<T> {
6 method1(T t) => null; /// 01: ok
7 method2(T t) => null; /// 02: ok
8 method4(T t) => null; /// 04: static type warning
9 method5(T t) => null; /// 05: ok
10 method7(T t) => null; /// 07: static type warning
11 }
12
13 class B<S> extends A
14 <S> /// 01: continued
15 <num> /// 02: continued
16 <S> /// 04: continued
17 <S> /// 05: continued
18 {
19 method1(S s) => null; /// 01: continued
20 method2(int i) => null; /// 02: continued
21 method3(S s) => null; /// 03: ok
22 method4(int i) => null; /// 04: continued
23 method6(S s) => null; /// 06: static type warning
24 }
25
26 abstract class I<U> {
27 method3(U u) => null; /// 03: continued
28 method6(U u) => null; /// 06: continued
29 method7(U u) => null; /// 07: continued
30 method8(U u) => null; /// 08: static type warning
31 method9(U u) => null; /// 09: static type warning
32 method10(U u) => null; /// 10: static type warning
33 }
34
35 abstract class J<V> {
36 method8(V v) => null; /// 08: continued
37 method9(V v) => null; /// 09: continued
38 method10(V v) => null; /// 10: continued
39 }
40
41 abstract class Class<W> extends B
42 <double> /// 03: continued
43 <W> /// 05: continued
44 <W> /// 06: continued
45 <int> /// 07: continued
46 implements I
47 <int> /// 03: continued
48 <num> /// 06: continued
49 <String> /// 07: continued
50 <int> /// 08: continued
51 <int> /// 09: continued
52 <int> /// 10: continued
53 , J
54 <String> /// 08: continued
55 <num> /// 09: continued
56 <num> /// 10: continued
57 {
58 method3(num i) => null; /// 03: continued
59 method5(W w) => null; /// 05: continued
60 method6(int i) => null; /// 06: continued
61 method7(double d) => null; /// 07: continued
62 method8(double d) => null; /// 08: continued
63 }
64
65 class SubClass extends Class {
66 method9(double d) => null; /// 09: continued
67 method10(String s) => null; /// 10: continued
68 }
69
70 main() {
71 new SubClass();
72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698