Debian Codegraph @

gcc/testsuite/gdc.test/compilable/fix21647.d

raw
1 /*
2 REQUIRED_ARGS: -preview=rvaluerefparam
3 TEST_OUTPUT:
4 ---
5 cast(void)0
6 cast(void)0
7 void
8 cast(void)0
9 cast(void)0
10 cast(void)0
11 void
12 ---
13 */
14
15
16 // https://issues.dlang.org/show_bug.cgi?id=21647
17
18 void foo() { return cast(void)1; }
19
20 void main(){}
21
22 alias V = void;
23
24 void test1() { pragma(msg, foo()); }
25 void test2() { pragma(msg, main()); }
26 void test3() { pragma(msg, V); }
27
28 pragma(msg, foo());
29 pragma(msg, main());
30 pragma(msg, V);
31
32 /*************************************************************/
33 // https://issues.dlang.org/show_bug.cgi?id=8255
34
35 struct G {}
36 struct F(T) { void f(ref T) {} }
37 pragma(msg, F!G().f(G.init));