[Issue 4702] Long Postfix not working with cross-module overloading
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 27 11:02:30 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4702
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #3 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-10-27 11:02:29 PDT ---
The problem is there are two overload sets and they're not explicitly merged.
The fix is:
import foo; // void fun(int x)
import bar; // void fun(long x)
alias foo.fun fun; // added
alias bar.fun fun; // added
void main()
{
auto y = 10L;
fun(y); // ok, goes to bar.fun
fun(10L); // error: bar.fun conflicts with foo.fun
}
--
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