]> git.ipfire.org Git - people/ms/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/fail15616a.d
d: Merge upstream dmd, druntime 4ca4140e58, phobos 454dff14d.
[people/ms/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail15616a.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail15616a.d(41): Error: none of the overloads of `foo` are callable using argument types `(double)`
5 fail_compilation/fail15616a.d(14): Candidates are: `fail15616a.foo(int a)`
6 fail_compilation/fail15616a.d(17): `fail15616a.foo(int a, int b)`
7 fail_compilation/fail15616a.d(26): `fail15616a.foo(int a, int b, int c)`
8 fail_compilation/fail15616a.d(29): `fail15616a.foo(string a)`
9 fail_compilation/fail15616a.d(32): `fail15616a.foo(string a, string b)`
10 fail_compilation\fail15616a.d(35): `fail15616a.foo(string a, string b, string c)`
11 fail_compilation/fail15616a.d(41): ... (2 more, -v to show) ...
12 ---
13 */
14 #line 14
15 void foo(int a)
16 {}
17
18 void foo(int a, int b)
19 {}
20
21 void foo(T)(T a) if (is(T == float))
22 {}
23
24 void foo(T)(T a) if (is(T == char))
25 {}
26
27 void foo(int a, int b, int c)
28 {}
29
30 void foo(string a)
31 {}
32
33 void foo(string a, string b)
34 {}
35
36 void foo(string a, string b, string c)
37 {}
38
39
40 void main()
41 {
42 foo(3.14);
43 }