[Issue 21570] __traits(isStaticArray, ...) accepts enums with static array as base type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 23 19:37:42 UTC 2021


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

--- Comment #3 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel updated dlang/dmd pull request #12142 "Fix 21570 -
__traits(isStaticArray, ...) accepts enums with static..." mentioning this
issue:

- Issue 21570 - Deprecate __traits(isStaticArray, ...) accepts enums

  ...with static array as base type.

  The spec[1] states that a named enum creates a distinct type which is
  implicitly convertible to it's base type. Hence `__traits(isStaticArray,
<enum>)`
  should yield `false` as done for an equivalent `is(...)` expression.

  [1] https://dlang.org/spec/enum.html#named_enums

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

--


More information about the Digitalmars-d-bugs mailing list