<code>
char[] foo(char[] str)
{
return str;
}
char[] foo(char[] str)
{
return str;
}
void main()
{
mixin(foo("int bar;"));
}
</code>
test.d(20): function test.foo called with argument types:
(char[8])
matches both:
test.foo(char[])
and:
test.foo(char[])
The message for the run-time evaluated functions is no less weird. Remove mixin(foo("int bar;")); and you get this from the linker:
Error 1: Previous Definition Different : _D4test3fooFAaZAa
Comment #1 by smjg — 2010-12-03T17:37:30Z
*** Issue 5312 has been marked as a duplicate of this issue. ***
Comment #2 by yebblies — 2011-06-10T09:15:15Z
*** Issue 2703 has been marked as a duplicate of this issue. ***
Comment #3 by yebblies — 2011-06-10T09:15:19Z
*** Issue 4680 has been marked as a duplicate of this issue. ***
Comment #4 by yebblies — 2012-01-29T07:34:28Z
Whoops. Oh well, 2789 has a patch.
*** This issue has been marked as a duplicate of issue 2789 ***