DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement
Neia Neutuladh
neia at ikeran.org
Tue Nov 13 00:21:25 UTC 2018
On Tue, 13 Nov 2018 00:08:04 +0000, Isaac S. wrote:
> If you really want this plaque in the language, at least make it not
> affect those that gave their enum a type. If you at least do that,
> someone can add it to DScanner to tell anyone that doesn't type their
> enum to expect illogical behavior.
Unfortunately, dscanner only parses code. It can't tell you that your
overload resolution depends on value range propagation on an enum value;
that depends on semantic analysis. So it would have to aggressively warn
you against using `enum Foo : some_int_type`.
More information about the Digitalmars-d-announce
mailing list