| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 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 | 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"; | |
| 6 | |
| 7 abstract class Interface { | 5 abstract class Interface { |
| 8 final x; | 6 final x; |
| 9 } | 7 } |
| 10 | 8 |
| 11 abstract class Abstract implements Interface { | 9 abstract class Abstract implements Interface { |
| 12 String toString() => x.toString(); | 10 String toString() => x.toString(); |
| 13 } | 11 } |
| 14 | 12 |
| 15 // This class does not implement "x" either, but it is not marked | 13 // This class does not implement "x" either, but it is not marked |
| 16 // abstract. | 14 // abstract. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 38 void main() { | 36 void main() { |
| 39 var x = new Abstract(); /// 02: runtime error | 37 var x = new Abstract(); /// 02: runtime error |
| 40 var y = new SubAbstract1(); /// 01: continued | 38 var y = new SubAbstract1(); /// 01: continued |
| 41 var z = new SubAbstract2(); | 39 var z = new SubAbstract2(); |
| 42 var a = new SubSubAbstract2(); /// 04: continued | 40 var a = new SubSubAbstract2(); /// 04: continued |
| 43 Expect.equals(x, x); /// 02: continued | 41 Expect.equals(x, x); /// 02: continued |
| 44 Expect.equals('7', new Concrete().toString()); | 42 Expect.equals('7', new Concrete().toString()); |
| 45 Expect.equals('42', new SubConcrete(42).toString()); | 43 Expect.equals('42', new SubConcrete(42).toString()); |
| 46 Expect.equals('7', new SubConcrete(new Concrete()).toString()); | 44 Expect.equals('7', new SubConcrete(new Concrete()).toString()); |
| 47 } | 45 } |
| OLD | NEW |