| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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 import "package:meta/meta.dart" show virtual; |
| 6 | 7 |
| 7 class A { | 8 class A { |
| 8 var foo; | 9 @virtual var foo; |
| 9 A(this.foo); | 10 A(this.foo); |
| 10 | 11 |
| 11 B_Sfoo() => 'A.B_Sfoo()'; | 12 B_Sfoo() => 'A.B_Sfoo()'; |
| 12 } | 13 } |
| 13 | 14 |
| 14 class B extends A { | 15 class B extends A { |
| 15 B(x) : super(x); | 16 B(x) : super(x); |
| 16 | 17 |
| 17 B_Sfoo() => super.foo; | 18 B_Sfoo() => super.foo; |
| 18 BC_Sfoo() => super.foo; | 19 BC_Sfoo() => super.foo; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 Expect.equals('Ba', inscrutable(b).BC_Sfoo()); | 80 Expect.equals('Ba', inscrutable(b).BC_Sfoo()); |
| 80 Expect.equals('Ca', inscrutable(c).BC_Sfoo()); | 81 Expect.equals('Ca', inscrutable(c).BC_Sfoo()); |
| 81 Expect.equals('Da', inscrutable(d).BC_Sfoo()); | 82 Expect.equals('Da', inscrutable(d).BC_Sfoo()); |
| 82 | 83 |
| 83 Expect.equals('Ba', inscrutable(b).BCD_Sfoo()); | 84 Expect.equals('Ba', inscrutable(b).BCD_Sfoo()); |
| 84 Expect.equals('Ca', inscrutable(c).BCD_Sfoo()); | 85 Expect.equals('Ca', inscrutable(c).BCD_Sfoo()); |
| 85 Expect.equals('Dc', inscrutable(d).BCD_Sfoo()); | 86 Expect.equals('Dc', inscrutable(d).BCD_Sfoo()); |
| 86 | 87 |
| 87 | 88 |
| 88 } | 89 } |
| OLD | NEW |