On Sunday, 16 September 2018 at 23:59:18 UTC, aliak wrote:
What about:

enum E: bool {
    no, yes
}

void main() {
    E e = cast(E)(0);
}

Would be illegal I assume?

You have an explicit cast, so no, it would be fine.



Reply via email to