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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 22 02:03:02 UTC 2021


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

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

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

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12721 "Fix 22053: Deprecate typeless catch at the
parser level" was merged into master:

- 85a12332f275a19b8e291489f3beb6e907310295 by Geod24:
  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