1 /* PERMUTE_ARGS:
2  * TEST_OUTPUT:
3 ---
4 compilable/future.d(15): Deprecation: @future base class method future.A.msg is being overridden by future.B.msg; rename the latter
5 ---
6  */
7 
8 class A
9 {
msg()10     @__future char msg() { return 'a'; }
11 }
12 
13 class B : A
14 {
msg()15     char msg() { return 'b'; }
16 }
17 
18 class C : B
19 {
msg()20     override char msg() { return 'c'; }
21 }
22 
23 class D : A
24 {
msg()25     override char msg() { return 'd'; }
26 }
27 
main()28 int main()
29 {
30     auto a = new A();
31     assert(a.msg() == 'a');
32     auto b = new B();
33     assert(b.msg() == 'b');
34     auto c = new C();
35     assert(c.msg() == 'c');
36     auto d = new D();
37     assert(d.msg() == 'd');
38 
39     assert(b.A.msg() == 'a');
40 
41     auto ba = cast(A)b;
42     assert(ba.msg() == 'a');
43 
44     auto da = cast(A)d;
45     assert(da.msg() == 'd');
46     return 0;
47 }
48