[Issue 8815] New: alias modification silently fails on nested fields
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 13 19:48:23 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8815
Summary: alias modification silently fails on nested fields
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-10-13 19:48:21 PDT ---
@property void modify(alias symb)()
{
symb = new int;
}
class Foo
{
this()
{
modify!(x);
modify!(c.x);
assert(x); // ok
assert(c.x); // fail, c.x. is null
}
static struct C { int* x; }
C c;
int* x;
}
void main()
{
auto foo = new Foo;
}
--
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