Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/nested_template_constraint.d(17): Error: template `foo` is not callable using argument types `!()(string, int)`
5 fail_compilation/nested_template_constraint.d(10): Candidate is: `foo(int x = 0)`
6 fail_compilation/nested_template_constraint.d(11): - Containing: `foo(T, U)(T t, U u)`
7 ---
8 */
9
10 template foo(int x = 0) {
11 void foo(T, U)(T t, U u)
12 if (is(T == int) && is(U == int)) {}
13 }
14
15 void main()
16 {
17 foo("hello", 4);
18 }