d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test13867.d
blob36543f92ebe97032395b563cdf6112eb4d462b23
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/test13867.d(12): Error: function `void test13867.X.blah()` does not override any function, did you mean to override `extern (C++) void test13867.Base.blah()`?
5 fail_compilation/test13867.d(19): Error: function `void test13867.Z.blah()` does not override any function, did you mean to override `extern (C++) void test13867.Base.blah()`?
6 ---
7 */
8 extern (C++) class Base {
9 void blah() {}
11 class X : Base {
12 override void blah();//Error
14 extern (C++) class Y : Base {
15 override void blah(){}
17 class Z : Base {
18 alias blah = typeof(super).blah;
19 override void blah(){}//Error
21 class O : Base {
22 extern (C++) override void blah(){}
24 extern (C++) class OK : Base {
25 alias blah = typeof(super).blah;
26 override void blah(){}
29 void main() {
30 scope b = new Base();
31 b.blah();
32 scope x = new X();
33 x.blah();
34 scope y = new Y();
35 y.blah();
36 scope o = new O();
37 o.blah();
38 scope z = new Z();
39 z.blah();