Discussion Thread: DIP 1034--Add a Bottom Type (reboot)--Community Review Round 1

Meta jared771 at gmail.com
Wed May 6 16:22:48 UTC 2020


noreturn x0; // compile error, must have bottom value

noreturn[1] x4; // compile error, init value is [assert(0)]

struct S {int x; noreturn y;} // definition is fine
S x5; // compile error, must have bottom value

enum E : noreturn {x = assert(0), y = assert(0)}
E e; // compile error, must have bottom value

Why are these defined to cause a compile error?


More information about the Digitalmars-d mailing list