[Issue 10069] New: Assignment to 'this' fails inside struct constructor during CTFE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 12 09:40:20 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10069
Summary: Assignment to 'this' fails inside struct constructor
during CTFE
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: tommitissari at hotmail.com
--- Comment #0 from Tommi <tommitissari at hotmail.com> 2013-05-12 09:40:19 PDT ---
module main;
struct Test
{
int v;
this(int)
{
v = 123;
}
this(int, int)
{
this = test; // #1
}
}
enum test = Test(1);
void main()
{
enum t = Test(11, 22); // #2
}
// #1: Error: CTFE internal error: unsupported assignment this = Test(123)
// #2: called from here: Test(0).this(11, 22)
--
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