ajhahn.de
← Flash
Flash 15 lines
// REJECT probe — instance typing extends kind checking: `Box(u8)` folds to
// `u8`, so the alias is a known type at the later application and passing
// it where a value parameter is declared is a definite kind error.

fn Box(comptime T type) type {
    return T
}

fn Ring(comptime n usize) type {
    return [n]u8
}

const B = Box(u8)
const R = Ring(B) // expect-error: argument 1 to generic 'Ring' expects a value, found a type