[Issue 9346] New: nested struct calls disabled postblit
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 18 03:44:50 PST 2013
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: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 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: -------
More information about the Digitalmars-d-bugs
mailing list