v/vlib/v/checker/tests/sum_type_assign_non_variant...

14 lines
224 B
V

type Expr = IfExpr | CallExpr | MatchExpr
struct MatchExpr {}
struct IfExpr {}
struct CallExpr {}
type Stmt = Expr | AnotherThing
struct AnotherThing {}
fn main() {
mut w := Stmt(AnotherThing{})
w = IfExpr{}
_ = w
}