OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 class A { | 5 class A { |
6 get getter1 => null; /// 01: ok | 6 get getter1 => null; //# 01: ok |
7 num get getter2 => null; /// 02: ok | 7 num get getter2 => null; //# 02: ok |
8 num get getter3 => null; /// 03: ok | 8 num get getter3 => null; //# 03: ok |
9 int get getter4 => null; /// 04: ok | 9 int get getter4 => null; //# 04: ok |
10 int get getter5 => null; /// 05: static type warning | 10 int get getter5 => null; //# 05: static type warning |
11 int get getter6 => null; /// 06: ok | 11 int get getter6 => null; //# 06: ok |
12 int get getter7 => null; /// 07: static type warning | 12 int get getter7 => null; //# 07: static type warning |
13 int get getter8 => null; /// 08: static type warning | 13 int get getter8 => null; //# 08: static type warning |
14 | 14 |
15 set setter1(_) => null; /// 21: ok | 15 set setter1(_) => null; //# 21: ok |
16 void set setter2(_) {} /// 22: ok | 16 void set setter2(_) {} //# 22: ok |
17 set setter3(_) => null; /// 23: ok | 17 set setter3(_) => null; //# 23: ok |
18 set setter4(_) => null; /// 24: ok | 18 set setter4(_) => null; //# 24: ok |
19 set setter5(num _) => null; /// 25: ok | 19 set setter5(num _) => null; //# 25: ok |
20 set setter6(num _) => null; /// 26: ok | 20 set setter6(num _) => null; //# 26: ok |
21 set setter7(int _) => null; /// 27: ok | 21 set setter7(int _) => null; //# 27: ok |
22 set setter8(int _) => null; /// 28: static type warning | 22 set setter8(int _) => null; //# 28: static type warning |
23 set setter9(int _) => null; /// 29: ok | 23 set setter9(int _) => null; //# 29: ok |
24 set setter10(int _) => null; /// 30: static type warning | 24 set setter10(int _) => null; //# 30: static type warning |
25 set setter11(int _) => null; /// 31: static type warning | 25 set setter11(int _) => null; //# 31: static type warning |
26 | 26 |
27 int field1; /// 41: ok | 27 int field1; //# 41: ok |
28 num field2; /// 42: ok | 28 num field2; //# 42: ok |
29 int field3; /// 43: ok | 29 int field3; //# 43: ok |
30 int field4; /// 44: static type warning | 30 int field4; //# 44: static type warning |
31 int field5; /// 45: ok | 31 int field5; //# 45: ok |
32 num field6; /// 46: ok | 32 num field6; //# 46: ok |
33 num field7; /// 47: static type warning | 33 num field7; //# 47: static type warning |
34 num get field8 => null; /// 48: static type warning | 34 num get field8 => null; //# 48: static type warning |
35 num field9; /// 49: ok | 35 num field9; //# 49: ok |
36 num field10; /// 50: ok | 36 num field10; //# 50: ok |
37 set field11(int _) {} /// 51: ok | 37 set field11(int _) {} //# 51: ok |
38 void set field12(int _) {} /// 52: ok | 38 void set field12(int _) {} //# 52: ok |
39 num field13; /// 53: static type warning | 39 num field13; //# 53: static type warning |
40 set field14(num _) {} /// 54: static type warning | 40 set field14(num _) {} //# 54: static type warning |
41 } | 41 } |
42 | 42 |
43 class B extends A { | 43 class B extends A { |
44 num get getter6 => null; /// 06: continued | 44 num get getter6 => null; //# 06: continued |
45 set setter9(num _) => null; /// 29: continued | 45 set setter9(num _) => null; //# 29: continued |
46 num field5; /// 45: continued | 46 num field5; //# 45: continued |
47 } | 47 } |
48 | 48 |
49 abstract class I { | 49 abstract class I { |
50 num get getter7 => null; /// 07: continued | 50 num get getter7 => null; //# 07: continued |
51 String get getter8 => null; /// 08: continued | 51 String get getter8 => null; //# 08: continued |
52 int get getter9 => null; /// 09: static type warning | 52 int get getter9 => null; //# 09: static type warning |
53 int get getter10 => null; /// 10: static type warning | 53 int get getter10 => null; //# 10: static type warning |
54 int get getter11 => null; /// 11: static type warning | 54 int get getter11 => null; //# 11: static type warning |
55 set setter10(num _) => null; /// 30: continued | 55 set setter10(num _) => null; //# 30: continued |
56 set setter11(String _) => null; /// 31: continued | 56 set setter11(String _) => null; //# 31: continued |
57 set setter12(int _) => null; /// 32: static type warning | 57 set setter12(int _) => null; //# 32: static type warning |
58 set setter13(int _) => null; /// 33: static type warning | 58 set setter13(int _) => null; //# 33: static type warning |
59 set setter13(num _) => null; /// 33a: static type warning | 59 set setter13(num _) => null; //# 33a: static type warning |
60 set setter14(int _) => null; /// 34: static type warning | 60 set setter14(int _) => null; //# 34: static type warning |
61 } | 61 } |
62 | 62 |
63 abstract class J { | 63 abstract class J { |
64 String get getter9 => null; /// 09: continued | 64 String get getter9 => null; //# 09: continued |
65 num get getter10 => null; /// 10: continued | 65 num get getter10 => null; //# 10: continued |
66 num get getter11 => null; /// 11: continued | 66 num get getter11 => null; //# 11: continued |
67 set setter12(String _) => null; /// 32: continued | 67 set setter12(String _) => null; //# 32: continued |
68 set setter13(num _) => null; /// 33: continued | 68 set setter13(num _) => null; //# 33: continued |
69 set setter13(int _) => null; /// 33a: continued | 69 set setter13(int _) => null; //# 33a: continued |
70 set setter14(num _) => null; /// 34: continued | 70 set setter14(num _) => null; //# 34: continued |
71 } | 71 } |
72 | 72 |
73 abstract class Class extends B implements I, J { | 73 abstract class Class extends B implements I, J { |
74 get getter1 => null; /// 01: continued | 74 get getter1 => null; //# 01: continued |
75 num get getter2 => null; /// 02: continued | 75 num get getter2 => null; //# 02: continued |
76 int get getter3 => null; /// 03: continued | 76 int get getter3 => null; //# 03: continued |
77 num get getter4 => null; /// 04: continued | 77 num get getter4 => null; //# 04: continued |
78 double get getter5 => null; /// 05: continued | 78 double get getter5 => null; //# 05: continued |
79 double get getter6 => null; /// 06: continued | 79 double get getter6 => null; //# 06: continued |
80 double get getter7 => null; /// 07: continued | 80 double get getter7 => null; //# 07: continued |
81 double get getter8 => null; /// 08: continued | 81 double get getter8 => null; //# 08: continued |
82 double get getter9 => null; /// 09: continued | 82 double get getter9 => null; //# 09: continued |
83 | 83 |
84 set setter1(_) => null; /// 21: continued | 84 set setter1(_) => null; //# 21: continued |
85 set setter2(_) => null; /// 22: continued | 85 set setter2(_) => null; //# 22: continued |
86 void set setter3(_) {} /// 23: continued | 86 void set setter3(_) {} //# 23: continued |
87 void set setter4(_) {} /// 24: continued | 87 void set setter4(_) {} //# 24: continued |
88 set setter5(num _) => null; /// 25: continued | 88 set setter5(num _) => null; //# 25: continued |
89 set setter6(int _) => null; /// 26: continued | 89 set setter6(int _) => null; //# 26: continued |
90 set setter7(num _) => null; /// 27: continued | 90 set setter7(num _) => null; //# 27: continued |
91 set setter8(double _) => null; /// 28: continued | 91 set setter8(double _) => null; //# 28: continued |
92 set setter9(double _) => null; /// 29: continued | 92 set setter9(double _) => null; //# 29: continued |
93 set setter10(double _) => null; /// 30: continued | 93 set setter10(double _) => null; //# 30: continued |
94 set setter11(double _) => null; /// 31: continued | 94 set setter11(double _) => null; //# 31: continued |
95 set setter12(double _) => null; /// 32: continued | 95 set setter12(double _) => null; //# 32: continued |
96 | 96 |
97 int field1; /// 41: continued | 97 int field1; //# 41: continued |
98 int field2; /// 42: continued | 98 int field2; //# 42: continued |
99 num field3; /// 43: continued | 99 num field3; //# 43: continued |
100 double field4; /// 44: continued | 100 double field4; //# 44: continued |
101 double field5; /// 45: continued | 101 double field5; //# 45: continued |
102 int get field6 => null; /// 46: continued | 102 int get field6 => null; //# 46: continued |
103 String get field7 => null; /// 47: continued | 103 String get field7 => null; //# 47: continued |
104 String field8; /// 48: continued | 104 String field8; //# 48: continued |
105 set field9(int _) {} /// 49: continued | 105 set field9(int _) {} //# 49: continued |
106 void set field10(int _) {} /// 50: continued | 106 void set field10(int _) {} //# 50: continued |
107 num field11; /// 51: continued | 107 num field11; //# 51: continued |
108 num field12; /// 52: continued | 108 num field12; //# 52: continued |
109 set field13(String _) {} /// 53: continued | 109 set field13(String _) {} //# 53: continued |
110 String field14; /// 54: continued | 110 String field14; //# 54: continued |
111 } | 111 } |
112 | 112 |
113 class SubClass extends Class { | 113 class SubClass extends Class { |
114 double get getter10 => null; /// 10: continued | 114 double get getter10 => null; //# 10: continued |
115 String get getter11 => null; /// 11: continued | 115 String get getter11 => null; //# 11: continued |
116 set setter13(double _) => null; /// 33: continued | 116 set setter13(double _) => null; //# 33: continued |
117 set setter13(double _) => null; /// 33a: continued | 117 set setter13(double _) => null; //# 33a: continued |
118 set setter14(String _) => null; /// 34: continued | 118 set setter14(String _) => null; //# 34: continued |
119 } | 119 } |
120 | 120 |
121 main() { | 121 main() { |
122 new SubClass(); | 122 new SubClass(); |
123 } | 123 } |
OLD | NEW |