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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au


--- Comment #2 from Don <clugd...@yahoo.com.au> 2012-01-25 12:50:00 PST ---
Reduced test case:
struct S
{
    int member;
    @property ref int refCountedPayload() { return member; }
    alias refCountedPayload this;
}


// If you remove this next line, it works.
void foo(S)(immutable S t, int qq) pure { }
void foo(S)(S s) pure { }

void bar() pure
{
    S b;
    foo!int(b);
}
-------------------

The bug is in template.c, deduceFunctionTemplateMatch().
If a parameter fails to match (the immutable S above), it tries alias this. The
first is to run semantic on the alias this, which causes the error. Those error
messages should be suppressed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to