Debian Codegraph @

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

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