www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17689] New: finally clause leaks declarations

https://issues.dlang.org/show_bug.cgi?id=17689

          Issue ID: 17689
           Summary: finally clause leaks declarations
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: timon.gehr gmx.ch

The following code compiles and runs:

void main(){
    try{}
    finally int x=3;
    assert(x==3);
}

The problem is that the parser does not pass PSscope when parsing the statement
for the finally clause.

--
Jul 25