[Issue 22981] premature enum type inference leads to spurious error message
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 30 17:31:15 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22981
--- Comment #12 from Max Samukha <maxsamukha at gmail.com> ---
(In reply to Basile-z from comment #10)
> looks like enum being integral is assumed too early ;)
>
> for example if you change the infered type of S.a
>
> ```
> enum E { e1 = S.a }
>
> struct S
> {
> E e;
> enum a = 123; // vs enum a = "string"
> }
> ```
>
> no problems anymore
Seems to be unrelated to the original issue. In the original test case, the
enum is integral - it is the member's name that is mixed-in.
--
More information about the Digitalmars-d-bugs
mailing list