navid/haze / cb1bac46fbd9fca0f0e2a401590740b0840b47821983a25743fc29c1572577d9 / samples/baseline_2.8/generic_literal_args_error.hz
generic_literal_args_error.hz
← samples/baseline_2.8 · 183 bytes · raw · download
// Generic record literals need their type arguments.
type Pair[A, B] {
first A
second B
}
fn main() {
const p = Pair[i32]{ first = 1, second = 2 }
print(p.first)
}