[Issue 4576] [tdpl] 0/1 argument calls to overloaded function is allowed in presence of variadic function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 17 12:48:07 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4576
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|Windows |All
--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-09-17 12:48:04 PDT ---
Reduced test-case:
-----
void test(int[] arr...) { assert(1); }
void test() { assert(0); } // hijacks (shadows) above function
void main()
{
test(); // should fail at CT, not RT.
}
-----
Comment out the second function and the first one will be called. The `test()`
call should be ambiguous and issue a compile-time error.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list