Thread overview
[Issue 7294] New: [Regression] No warning when escaping local reference type variables
Jan 15, 2012
dawg@dawgfoto.de
Feb 02, 2012
Walter Bright
January 15, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7294

           Summary: [Regression] No warning when escaping local reference
                    type variables
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: dawg@dawgfoto.de


--- Comment #0 from dawg@dawgfoto.de 2012-01-15 06:39:05 PST ---
Object foo()
{
    scope obj = new Object;
    return obj;
}

----
Introduced with: https://github.com/D-Programming-Language/dmd/commit/931100137ee60f5d269f6c0bcf2ae34d188d54db

ExpStatement::scopeCode sets the noscope flag to mark that the destructor already ran. This prevents VarExp::checkEscape from emitting an error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7294



--- Comment #1 from github-bugzilla@puremagic.com 2012-02-01 17:23:12 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/28324c5c1226571f2ee96eebee5fd3ad09ebe031
fix Issue 7294 - [Regression] No warning when escaping local reference type
variables

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7294


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: -------