Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fail20376.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=20376
2
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail20376.d(17): Error: return value `Foo()` of type `Foo` does not match return type `ubyte`, and cannot be implicitly converted
7 ---
8 */
9
10 struct Foo
11 {
12 this(ref scope Foo);
13 }
14
15 ubyte fun()
16 {
17 return Foo();
18 }
19
20 void main(){}