MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail14965.d
blob37fc0fa0cc62f970155cfc9500d4ac361badd6eb
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail14965.d(19): Error: forward reference to inferred return type of function `foo1`
5 fail_compilation/fail14965.d(20): Error: forward reference to inferred return type of function `foo2`
6 fail_compilation/fail14965.d(22): Error: forward reference to inferred return type of function `bar1`
7 fail_compilation/fail14965.d(23): Error: forward reference to inferred return type of function `bar2`
8 fail_compilation/fail14965.d(25): Error: forward reference to inferred return type of function `baz1`
9 fail_compilation/fail14965.d(26): Error: forward reference to inferred return type of function `baz2`
10 fail_compilation/fail14965.d(30): Error: forward reference to inferred return type of function `foo1`
11 fail_compilation/fail14965.d(31): Error: forward reference to inferred return type of function `foo2`
12 fail_compilation/fail14965.d(33): Error: forward reference to inferred return type of function `bar1`
13 fail_compilation/fail14965.d(34): Error: forward reference to inferred return type of function `bar2`
14 fail_compilation/fail14965.d(36): Error: forward reference to inferred return type of function `baz1`
15 fail_compilation/fail14965.d(37): Error: forward reference to inferred return type of function `baz2`
16 ---
19 auto foo1() { alias F = typeof(foo1); } // TypeTypeof
20 auto foo2() { alias FP = typeof(&foo2); } // TypeTypeof
22 auto bar1() { auto fp = &bar1; } // ExpInitializer
23 auto bar2() { auto fp = cast(void function())&bar2; } // castTo
25 auto baz1() { return &baz1; } // ReturnStatement
26 auto baz2() { (&baz2); } // ExpStatement
28 class C
30 auto foo1() { alias F = typeof(this.foo1); }
31 auto foo2() { alias FP = typeof(&this.foo2); }
33 auto bar1() { auto fp = &this.bar1; }
34 auto bar2() { auto dg = cast(void delegate())&this.bar2; }
36 auto baz1() { return &baz1; }
37 auto baz2() { (&baz2); }