January 18, 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@puremagic.com
        ReportedBy: monarchdodra@gmail.com


--- Comment #0 from monarchdodra@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: -------
April 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9346


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
            Version|unspecified                 |D2


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2013-04-04 07:10:30 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1838

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 06, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9346



--- Comment #2 from github-bugzilla@puremagic.com 2013-04-05 21:58:35 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/74890b1ec2abbb0bb26cc03055d3dbdf0e0014c0 fix Issue 9346 - nested struct calls disabled postblit

Move postblit call generation from glue layer to front-end layer.

https://github.com/D-Programming-Language/dmd/commit/7b6dc0080406a8562fc7282217b35f112dcea22f Merge pull request #1838 from 9rnsr/fix9346

Issue 9346 - nested struct calls disabled postblit

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9346


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home