MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test18385b.d
blobf0b9d014f8416a51fc1ef1e3902178abb5f53cf9
1 /*
2 Previous implementation raised errors for overloads using alias declarations
3 because they ignored the actual function name
5 TEST_OUTPUT:
6 ---
7 fail_compilation/test18385b.d(13): Error: `test18385b.S.foo` called with argument types `(int)` matches both:
8 fail_compilation/test18385b.d(8): `test18385b.S.foo(int s)`
9 and:
10 fail_compilation/test18385b.d(3): `test18385b.foo(int s)`
11 fail_compilation/test18385b.d(102): Error: `test18385b.bar` called with argument types `(int)` matches both:
12 fail_compilation/test18385b.d(2): `test18385b.bar(int s)`
13 and:
14 fail_compilation/test18385b.d(3): `test18385b.foo(int s)`
15 ---
17 #line 1
19 void bar(int s) {}
20 void foo(int s) {}
21 alias bar = foo;
23 struct S
25 void foo(int s) {}
26 alias foo = bar;
28 void useEm()
30 foo(1);
34 // False positive in mutex.d when building druntime
35 class Mutex
37 this() {}
38 this() shared {}
39 this(Object obj) {}
42 #line 100
43 void main()
45 bar(0);
46 new Mutex();