MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail23151.d
blobe24dcc2b704ef949ce1b2cf63ca6a27236233b99
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail23151.d(30): Error: class `fail23151.makeDerivedObj.Derived` is nested within `makeDerivedObj`, but super class `Base` is nested within `makeBaseObj`
5 ---
6 */
7 interface I
9 void intfunc(int x);
12 auto makeBaseObj()
14 int realPrivateX;
15 class Base : I
17 private int modulePrivateX;
18 int publicX;
19 override void intfunc(int x)
21 realPrivateX++; // expected OK
24 return new Base;
27 auto makeDerivedObj()
29 int realPrivateY;
30 class Derived : typeof(makeBaseObj())
32 private int modulePrivateY;
33 int publicY;
34 override void intfunc(int x)
36 realPrivateX++; // expected NG
37 modulePrivateX++;
40 return new Derived;