www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10053] New: struct member with pure dtor forces declared to be pure, too

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10053

           Summary: struct member with pure dtor forces declared to be
                    pure, too
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: henning still-hidden.de


--- Comment #0 from Henning Pohl <henning still-hidden.de> 2013-05-09 14:45:15
PDT ---
struct S1
{
    ~this() pure { }
}

struct S2
{
    S1 s;
    ~this() { }
}

void main() { }

2.063a:
-----
Error: pure function 'main.S2.~this' cannot call impure function
'main.S2.~this'
-----

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 09 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10053


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid


--- Comment #1 from Henning Pohl <henning still-hidden.de> 2013-05-09 15:01:45
PDT ---
https://github.com/D-Programming-Language/dmd/pull/1999

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 09 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10053



--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2013-05-09 23:58:04 PDT ---
Is this really a regression? The OP code didn't compile with 2.062 and earlier.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 09 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10053



--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2013-05-10 00:29:11 PDT ---
(In reply to comment #2)
 Is this really a regression? The OP code didn't compile with 2.062 and earlier.
OK, I confirmed. Instead of the OP code, this code: struct S1 { pure ~this() { } } struct S2 { S1 s; ~this() { } } compiles with 2.062 but fails with git head(1290d1b). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 10 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10053



--- Comment #4 from github-bugzilla puremagic.com 2013-05-10 00:53:34 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/340e39ca62067597e119b786dc87364a988ca292
fix issue 10053 - struct member with pure dtor forces declared dtor to
be pure, too

https://github.com/D-Programming-Language/dmd/commit/c7f2b375dc17819f69a334f00b6ede2345588798
Merge pull request #1999 from hpohl/10053

[REG2.063a] Issue 10053 - struct member with pure dtor forces declared dtor to
be pure, too

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 10 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10053


Henning Pohl <henning still-hidden.de> 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: -------
May 10 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10053



--- Comment #5 from github-bugzilla puremagic.com 2013-05-10 12:29:55 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/65dfa73ebe20e8bfc10f328ccac8ff44653ea771
Move test case for issue 10053 to runnable/sdtor.d

Collecting tests for struct destructor into same file is useful.

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