Debian Codegraph @

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

raw
1
2
3 // REQUIRED_ARGS: -de
4 /*
5 TEST_OUTPUT:
6 ---
7 fail_compilation/ice11822.d(33): Deprecation: function `ice11822.d` is deprecated
8 fail_compilation/ice11822.d(16): instantiated from here: `__lambda_L33_C15!int`
9 fail_compilation/ice11822.d(22): instantiated from here: `S!(__lambda_L33_C15)`
10 fail_compilation/ice11822.d(33): instantiated from here: `g!((n) => d(i))`
11 ---
12 */
13
14 struct S(alias pred)
15 {
16 this(int) { pred(1); }
17 void f() { pred(2); }
18 }
19
20 auto g(alias pred)()
21 {
22 return S!pred(3);
23 }
24
25 deprecated bool d(int)
26 {
27 return true;
28 }
29
30 auto h()
31 {
32 int i;
33 return g!(n => d(i))();
34 }