]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/retref2.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / retref2.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/retref2.d(18): Error: function `ref int retref2.D.foo(return ref int)` does not override any function, did you mean to override `ref int retref2.C.foo(ref int)`?
5 fail_compilation/retref2.d(19): Error: function `ref scope int retref2.D.bar() return` does not override any function, did you mean to override `ref int retref2.C.bar()`?
6 ---
7 */
8
9
10 class C
11 {
12 ref int foo(ref int);
13 ref int bar();
14 }
15
16 class D : C
17 {
18 override ref int foo(return ref int);
19 override ref int bar() return;
20 }