OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
6 | 6 |
7 var result; | 7 var result; |
8 | 8 |
9 class A { | 9 class A { |
10 noSuchMethod(im) { | 10 noSuchMethod(im) { |
11 result = 42; | 11 result = 42; |
12 } | 12 } |
13 } | 13 } |
14 | 14 |
15 class B extends A { | 15 class B extends A { |
16 noSuchMethod(im) { | 16 noSuchMethod(im) { |
17 result = 87; | 17 result = 87; |
18 } | 18 } |
19 | 19 |
20 set foo(v) => super.foo = v; //# 01: static type warning | 20 set foo(v) => super.foo = v; //# 01: static type warning |
21 } | 21 } |
22 | 22 |
23 main() { | 23 main() { |
24 new B().foo = 0; // //# 01: continued | 24 new B().foo = 0; // //# 01: continued |
25 Expect.equals(42, result); //# 01: continued | 25 Expect.equals(42, result); //# 01: continued |
26 } | 26 } |
OLD | NEW |