v/vlib/v/checker/tests/assign_sumtype2_err.vv

15 lines
147 B
V

type Stmt = Decl | Expr
struct Decl {}
struct Expr {}
struct File {
decl Decl
}
fn main() {
stmt := Stmt(Decl{})
_ := File{
decl: stmt
}
}