[Issue 7477] Enum structs without specified values
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Aug 10 03:13:01 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=7477
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WORKSFORME
--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
In git-head, diagnostic has been improved.
(In reply to Don from comment #0)
> struct Foo { int x; }
> enum Bar : Foo { a, b }
test.d(2): Error: cannot implicitly convert expression (0) of type int to Foo
(In reply to Jonathan M Davis from comment #1)
> The same thing happens if you do something like
>
> enum Foo : string { a, b }
test.d(1): Error: cannot implicitly convert expression (0) of type int to
string
--
More information about the Digitalmars-d-bugs
mailing list