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

Dlang Bot <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #5 from Dlang Bot <[email protected]> ---
@MoonlightSentinel updated dlang/dmd pull request #13516 "Don't crash for
conditionally empty body of TryStatement" fixing this issue:

- 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