[Issue 3268] can't compare pointer to functions when one is const

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 27 14:11:14 PDT 2009


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





--- Comment #1 from Andrei Alexandrescu <andrei at metalanguage.com>  2009-08-27 14:11:13 PDT ---
void fun() {}

void main()
{
    auto a = &fun;
    const b = a;
    assert(a == b);
}

This fails to compile. The error message is odd too:

Error: array equality comparison type mismatch, void function() vs const(void
function())

The code should work.

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