Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag8714.d(9): Error: function `diag8714.foo` circular dependency. Functions cannot be interpreted while being compiled
5 fail_compilation/diag8714.d(15): called from here: `foo("somestring")`
6 ---
7 */
8
9 string foo(string f)
10 {
11 if (f == "somestring")
12 {
13 return "got somestring";
14 }
15 return bar!(foo("somestring"));
16 }
17
18 template bar(string s)
19 {
20 enum bar = s;
21 }