[Issue 17689] New: finally clause leaks declarations

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jul 25 17:17:33 PDT 2017


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 at puremagic.com
          Reporter: timon.gehr at 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.

--


More information about the Digitalmars-d-bugs mailing list