www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22164] New: Rewrite for scope guards produces inconsistent AST

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

          Issue ID: 22164
           Summary: Rewrite for scope guards produces inconsistent AST
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

The semantic analysis rewrites scope guards using try-catch statements. But
this process leaves null's in the list of statements instead of fully replacing
the exisitng ScopeGuardStatement (and hence leaves an inconsistent AST).

See the FIXME comments in test/unit/semantic/control_flow.d introduced in
https://github.com/dlang/dmd/pull/12939

--
Aug 01