Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail116.d(11): Error: undefined identifier `x`
5 fail_compilation/fail116.d(16): Error: template instance `square!1.2` does not match template declaration `square(_error_ x)`
6 ---
7 */
8
9 // https://issues.dlang.org/show_bug.cgi?id=405
10 // typeof in TemplateParameterList causes compiletime segmentfault
11 template square(typeof(x) x)
12 {
13 const square = x * x;
14 }
15
16 const b = square!(1.2);