[Issue 17690] New: scope guards leak declarations

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


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

          Issue ID: 17690
           Summary: scope guards leak declarations
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: timon.gehr at gmx.ch

---
void main(){
    scope(exit) int x=3;
    assert(x==3);
}
---
---
Internal error: ddmd/backend/symbol.c 1040
---

The problem is that the parser passes PScurlyscope instead of PSscope when
parsing the scope guard statement.

--


More information about the Digitalmars-d-bugs mailing list