blob: 508cbf2e2f23d665e9ff45463480352829f7f577 [file] [log] [blame]
Ryan Macnak00b2e582020-01-22 18:46:23 +00001// 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
5library test.model;
6
7var accessorA;
8
9var accessorB;
10
11var accessorC;
12
13var fieldC;
14
15class 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
26class 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
37class 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}