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

Dlang Bot <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Dlang Bot <[email protected]> ---
dlang/dmd pull request #13516 "Fix 22365 - Don't crash for conditionally empty
body of a TryStatement" was merged into stable:

- 4b2b2af5c276f64334a8eb9daf0c00db83cb93d2 by MoonlightSentinel:
  Fix 22365 - Don't crash for conditionally empty body of a TryStatement

  The body may end up empty / null after `statementSemantic` if it only
  contains conditionally compiled statements (`version`, `debug`, ...)
  whose conditions are not met.

  This only triggered for the `-preview=dtorfields` rewrite because it
  didn't wrap the empty body into an additional `ScopeStatement`. But it
  should be sufficient to check during `TryStatement` semantic instead
  of unconditionally allocating an additional node for this rare case.

https://github.com/dlang/dmd/pull/13516

--

Reply via email to