v/vlib/v/checker/tests/unknown_as_type.vv

14 lines
124 B
V

type Expr = Int | String
struct Int {}
struct String {}
fn foo(e Expr) {
x := e as Stringg
println(x)
}
fn main() {
}