http://d.puremagic.com/issues/show_bug.cgi?id=9346
Summary: nested struct calls disabled postblit
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: critical
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-01-18 03:44:49 PST ---
//----
struct S
{
@disable this(this)
//{assert(false);}
;
}
struct SS1
{
S s;
}
struct SS2
{
S s;
this(this){}
}
void main()
{
S s;
SS1 ss1 = SS1(s);
SS2 ss2 = SS2(s);
}
//----
Produces:
//----
main.obj(main)
Error 42: Symbol Undefined _D4main1S10__postblitMFZv
//----
We can uncomment the postblit implementation, it which case it will link, and
throw the assert during the runtime.
I'd expect, in both cases, for the code to not compile.
Marking as critical, since the compiler is clearly calling something it
shouldn't. Furthermore, since the error is a link error, there is no way to
catch this in conditional compilation.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------