digitalmars.D.bugs - [Issue 9197] New: Assigning structs with postblit to a member of another struct fails at CTFE
- d-bugmail puremagic.com (46/46) Dec 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9197
- d-bugmail puremagic.com (12/12) Dec 22 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9197
- d-bugmail puremagic.com (11/11) Dec 24 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9197
- d-bugmail puremagic.com (11/11) Sep 09 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9197
http://d.puremagic.com/issues/show_bug.cgi?id=9197
Summary: Assigning structs with postblit to a member of another
struct fails at CTFE
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: dmitry.olsh gmail.com
12:48:03 PST ---
This sample:
trusted struct U
{
this(this)
{
}
}
struct InvList
{
private:
U data;
};
static InvList ivals()
{
InvList list;
//next line fails
list.data = U.init;
U a;
//while this one works
a = U.init;
return list;
}
immutable foo = ivals();
Fails to compile with:
Error: CTFE internal error: unsupported assignment this = p
ctfe_this.d(18): called from here: list.data.opAssign(U())
ctfe_this.d(24): called from here: ivals()
Notice the first error without a line number.
Tested with lastest dmd from master.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9197
Dmitry Olshansky <dmitry.olsh gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
13:22:17 PST ---
Looks I'm stuck with it in the middle of reworking the core part of new
std.uni.
My attempt to sidestep it by doing the same in constructor didn't work out.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9197
Dmitry Olshansky <dmitry.olsh gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
04:19:37 PST ---
Lovering severity as there is a workaround to construct data with __gshared +
shared static this constructor. Not pretty but workable.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 24 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9197
Dmitry Olshansky <dmitry.olsh gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
10:29:03 PDT ---
Was fixed somewhere during the 8 months since back then.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 09 2013









d-bugmail puremagic.com 