Debian Codegraph @

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

raw
1 /*
2 REQUIRED_ARGS: -verror-supplements=2
3 TEST_OUTPUT:
4 ---
5 fail_compilation/fail15616d.d(44): Error: none of the overloads of `foo` are callable using argument types `(double)`
6 fail_compilation/fail15616d.d(17): Candidates are: `fail15616d.foo(int a)`
7 fail_compilation/fail15616d.d(20): `fail15616d.foo(int a, int b)`
8 fail_compilation/fail15616d.d(44): ... (6 more, -v to show) ...
9 ---
10 */
11
12 #line 17
13 void foo(int a)
14 {}
15
16 void foo(int a, int b)
17 {}
18
19 void foo(T)(T a) if (is(T == float))
20 {}
21
22 void foo(T)(T a) if (is(T == char))
23 {}
24
25 void foo(int a, int b, int c)
26 {}
27
28 void foo(string a)
29 {}
30
31 void foo(string a, string b)
32 {}
33
34 void foo(string a, string b, string c)
35 {}
36
37
38 void main()
39 {
40 foo(3.14);
41 }