[Issue 19864] New: EnumMembers with deprecated members
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat May 11 21:00:29 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19864
Issue ID: 19864
Summary: EnumMembers with deprecated members
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: d.bugs at webfreak.org
import std.traits;
enum Foo
{
a,
deprecated b
}
alias Bar = EnumMembers!Foo;
This code will output 6 deprecation notices:
.../std/traits.d(4120): Deprecation: enum member `a.Foo.b` is deprecated
.../std/traits.d-mixin-4108(4108): Deprecation: enum member `a.Foo.b` is
deprecated
.../std/traits.d(4119): Deprecation: enum member `a.Foo.b` is deprecated
.../std/traits.d(4120): Deprecation: enum member `a.Foo.b` is deprecated
.../std/traits.d-mixin-4108(4108): Deprecation: enum member `a.Foo.b` is
deprecated
.../std/traits.d(4119): Deprecation: enum member `a.Foo.b` is deprecated
There should be no deprecations for simply listing the members into a tuple as
EnumMembers is heavily used in phobos and libraries.
See also: issue 19547 describing how @disable members break writeln
--
More information about the Digitalmars-d-bugs
mailing list