[Issue 7295] Alias This + Pure + pointsTo = rejects-valid
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 25 12:50:02 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7295
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
--- Comment #2 from Don <clugdbug at 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: -------
More information about the Digitalmars-d-bugs
mailing list