v/vlib/v/checker/tests/match_expr_else.vv

42 lines
347 B
V

type AA = int | string | f64
fn main() {
x := AA('test')
_ = match x {
int {
'int'
}
string {
'string'
}
}
_ = match x {
int {
'int'
}
string {
'string'
}
f64 {
'f64'
}
else {
'else'
}
}
_ = match x {
int {
'int'
}
string {
'string'
}
else {
'else'
}
f64 {
'f64'
}
}
}