[Issue 12291] New: Pick up "this" from alias parameters to nested templates
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 3 04:31:42 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12291
Summary: Pick up "this" from alias parameters to nested
templates
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: thecybershadow at gmail.com
--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-03-03 14:31:40 EET ---
////// test.d /////
void fun(alias a)()
{
a = 42;
}
struct S
{
int x;
}
void main()
{
S s;
fun!(s.x)();
}
///////////////////
Currently, this fails with:
test.d(14): Error: need 'this' for 'fun' of type 'pure nothrow @safe void()'
However, we provide the "this" in the "s.x" expression.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list