v/vlib/v/checker/tests/is_type_not_exist.v

12 lines
187 B
V

type Integer = i8 | i16 | int | i64
fn main() {
fn_with_sum_type_param(1)
}
fn fn_with_sum_type_param(i Integer) {
if i is SomethingThatDontExist {
println('It should fail !')
}
}