v/vlib/v/checker/tests/match_alias_type_err.vv

17 lines
214 B
V

type Stmt = SelectStmt
struct SelectStmt {}
fn parse(sql string) Stmt {
return SelectStmt{}
}
fn main() {
stmt := parse('select 123')
match stmt {
SelectStmt { panic('select') }
else { /* why? */ }
}
}