[Issue 10819] Invalid comparison for equality of lambda functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 14 13:14:06 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10819



--- Comment #5 from Peter Alexander <peter.alexander.au at gmail.com> 2013-08-14 13:14:03 PDT ---
(In reply to comment #4)
> We can assume the bodies of the lambdas compared are always available, which
> makes comparisons easier.

This doesn't avoid the name mangling problem:

-------------------------------------------
module A;
struct S(alias F)
{
    static immutable string s = F.mangleof;
}
-------------------------------------------
module B;
S!(a => a) foo;
-------------------------------------------
module C;
S!(a => a) bar;
-------------------------------------------

If I've understood correctly, you want foo and bar to be of the same type, but
they can't be because the static s member must have a different value for each
type.

-- 
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