v/vlib/v/checker/tests/assign_sumtype_err.vv

16 lines
163 B
V

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