Ryan Macnak | 00b2e58 | 2020-01-22 18:46:23 +0000 | [diff] [blame] | 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 |
| 3 | // BSD-style license that can be found in the LICENSE file. |
| 4 | |
| 5 | library test.model; |
| 6 | |
| 7 | var accessorA; |
| 8 | |
| 9 | var accessorB; |
| 10 | |
| 11 | var accessorC; |
| 12 | |
| 13 | var fieldC; |
| 14 | |
| 15 | class A { |
| 16 | var field; |
| 17 | instanceMethod(x) => 'A:instanceMethod($x)'; |
| 18 | get accessor => 'A:get accessor'; |
| 19 | set accessor(x) { |
| 20 | accessorA = x; |
| 21 | } |
| 22 | |
| 23 | aMethod() => 'aMethod'; |
| 24 | } |
| 25 | |
| 26 | class B extends A { |
| 27 | get field => 'B:get field'; |
| 28 | instanceMethod(x) => 'B:instanceMethod($x)'; |
| 29 | get accessor => 'B:get accessor'; |
| 30 | set accessor(x) { |
| 31 | accessorB = x; |
| 32 | } |
| 33 | |
| 34 | bMethod() => 'bMethod'; |
| 35 | } |
| 36 | |
| 37 | class C extends B { |
| 38 | set field(x) { |
| 39 | fieldC = x; |
| 40 | } |
| 41 | |
| 42 | instanceMethod(x) => 'C:instanceMethod($x)'; |
| 43 | get accessor => 'C:get accessor'; |
| 44 | set accessor(x) { |
| 45 | accessorC = x; |
| 46 | } |
| 47 | |
| 48 | cMethod() => 'cMethod'; |
| 49 | } |