Flash 44 lines
// PASS probe — generic-checking boundaries stay silent: an unknown
// argument is never wrong (and never instantiated), an alias of a generic
// is a boundary rather than an application site, a dotted (imported)
// generic is out of reach, a parameter typed by another parameter is
// unchecked, and an ordinary function's call arity is not this checker's
// business.
use flibc
fn Ring(comptime n usize) type {
return [n]u8
}
fn List(comptime T type) type {
return struct {
item T,
}
}
fn Wrap(comptime T type, x T) type {
_ = x
return T
}
fn apply(n usize) void {
const R = Ring(n)
_ = R
}
const L = List
const X = L(u8)
fn imported(x flibc.List(u8, u8, u8)) void {
_ = x
}
const W = Wrap(u8, 5)
fn add(a u8, b u8) u8 {
return a + b
}
const S = add(1)