[Issue 15366] Enum typed as bool behaves as bool even when cast

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Nov 21 08:41:17 PST 2015


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

--- Comment #4 from github-bugzilla at puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/67a21a9ec222e63ad5bab445662de9114878bc90
fix Issue 15366 - Enum typed as bool behaves as bool even when cast

>From a CastExp 'a && b', its `semantic` returns an `AndAndExp` with the 'Enum'
type.
But if its `semantic` will be called once more, it will repaint its `type` to
'bool'.

Same problem exists in `OrOrExp`.

https://github.com/D-Programming-Language/dmd/commit/913ffbe000e99e3a2aa6caaea9994a103503d6ac
Merge pull request #5279 from 9rnsr/fix15366

Issue 15366 - Enum typed as bool behaves as bool even when cast

--


More information about the Digitalmars-d-bugs mailing list