[Issue 22053] `catch {` not rejected while in a template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 21 09:15:04 UTC 2021


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

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

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@Geod24 created dlang/dmd pull request #12721 "Fix 22053: Deprecate typeless
catch at the parser level" fixing this issue:

- Fix 22053: Deprecate typeless catch at the parser level

  Type-less catch was previously deprecated only at the semantic level.
  This is usually good, because it avoids spurious deprecations being triggered
  in versioned-out code or generally unused (uninstantiated) code,
  or in code that is 'deprecated'.
  However, the syntax has been deprecated for years now, and should ultimately
  be removed from the parser, but while validating the grammar, it was found
that
  the deprecation message didn't actually trigger in templated code, even
instantiated.
  While we could fix it by triggering a deprecation only when the code is
instantiated,
  this would still prevent us from removing support for parsing it.
  Instead, add a deprecation in the parser, so that code that wasn't caught
before will be.
  The existing error is left in place, ensuring we don't regress.

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

--


More information about the Digitalmars-d-bugs mailing list