Let's call the bottom type 'B' for the moment, for convenience.

If we think of it like a floating point NaN, then any type construction of B yields a B:

    const(B) -> B
    B* -> B
    B[] -> B
    X[B] -> B
    B[X] -> B

Since B cannot have a value, any expression that forms a B can be replaced with an assert(0).

    B foo(); // declaration
    foo() -> foo(); assert(0);

    cast(B)exp -> exp; assert(0);

    B b; -> assert(0);

Given a tuple of types:

    alias T = tuple(B,X);

is T equivalent to which of:

    B           (1)
    tuple(X)    (2)
    tuple(Y,X)  (3)
    tuple(B,X)  (4)

? I'm leaning toward (4) as making the most sense.

    struct S {
       T t;
    }

should then yield an error, while:

    struct S {
       T[1..1] t; // t is of type X
    }

would not.

Reply via email to