1 // PERMUTE_ARGS:
2 /*
3 TEST_OUTPUT:
4 ---
5 fail_compilation/diag10768.d(36): Error: cannot implicitly override base class method diag10768.Frop.frop with diag10768.Foo.frop; add 'override' attribute
6 ---
7 */
8 
CirBuff(T)9 struct CirBuff(T)
10 {
11     import std.traits: isArray;
12     CirBuff!T opAssign(R)(R) if (isArray!R)
13     {}
14 
15     T[] toArray()
16     {
17         T[] ret; //  = new T[this.length];
18         return ret;
19     }
20     alias toArray this;
21 }
22 
23 class Bar(T=int)
24 {
25     CirBuff!T _bar;
26 }
27 
28 class Once
29 {
30     Bar!Foo _foobar;
31 }
32 
33 class Foo : Frop
34 {
35     // override
frop()36     public int frop() { return 1; }
37 }
38 
39 class Frop
40 {
frop()41     public int frop() { return 0; }
42 }
43