[Issue 4028] delegates with differing default arguments lead to same template instantiation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 4 03:53:38 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4028
--- Comment #3 from nfxjfg at gmail.com 2010-04-04 03:53:30 PDT ---
Before I'm trying to forget this bug while cursing dmd to hell and inventing
awkward, code-inflating work arounds in my code, here's a simpler test case
that demonstrates the bug:
import std.stdio;
alias void delegate(int x = 123) Dg1;
alias void delegate(int x) Dg2;
void main() {
writefln("%s", Dg1.stringof);
writefln("%s", Dg2.stringof);
}
Output, expected:
void delegate(int x = 123)
void delegate(int x)
Output, actual with dmd 1.057:
void delegate(int x = 123)
void delegate(int x = 123)
Don't forget that this doesn't really scratch the template instantiation issue;
one could say that there are actually two bugs: 1. accidentally merging the
types Dg1 and Dg2 into one type, and 2. template instantiations with
delegates/functionpointers that have default arguments.
--
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