Thread overview
[Issue 10055] New: Incorrect attribute merging in destructor building
May 10, 2013
Kenji Hara
May 10, 2013
Henning Pohl
May 10, 2013
Kenji Hara
[Issue 10055] Incorrect attribute merging in dtor/postblit building
May 10, 2013
Kenji Hara
May 10, 2013
Walter Bright
May 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10055

           Summary: Incorrect attribute merging in destructor building
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2013-05-10 00:42:05 PDT ---
This is very similar to bug 10053.

This code works with 2.062, but fails with git head.

struct S1
{
    pure ~this() { }
}
struct S2
{
    ~this() { }
}
struct SX
{
    S1 s1;
    S2 s2;
}

Output:
Error: pure function 'test.SX.~this' cannot call impure function
'test.S2.~this'

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


Henning Pohl <henning@still-hidden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |henning@still-hidden.de


--- Comment #1 from Henning Pohl <henning@still-hidden.de> 2013-05-10 06:28:28 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2003

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



--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2013-05-10 07:28:17 PDT ---
Although this is not a regression, same issue exists in implicit postblit generation.

struct S1
{
    pure this(this) { }
}
struct S2
{
    pure this(this) { }
}
struct SX
{
    S1 s1;
    S2 s2;
}
void main() pure
{
    SX sx1;
    SX sx2 = sx1;   // should succeed to compile, but doesn't
}

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



--- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> 2013-05-10 08:20:27 PDT ---
(In reply to comment #1)
> https://github.com/D-Programming-Language/dmd/pull/2003

My fix, for both dtors and postblits. https://github.com/D-Programming-Language/dmd/pull/2006

I and Henning are discussing about compiler behavior in the pull request 2003.

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



--- Comment #4 from github-bugzilla@puremagic.com 2013-05-10 12:29:59 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/487b38293bee52927dd10ac4c6ab5e6d87428f78 fix Issue 10055 - Incorrect attribute merging in dtor/postblit building

https://github.com/D-Programming-Language/dmd/commit/43650b955f35e0fe0aea92d95e3ae7c707796e23 Merge pull request #2006 from 9rnsr/fix10055

[REG2.063a] Issue 10055 - Incorrect attribute merging in dtor/postblit building

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


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------