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