v2 / vlib / v / fmt / tests / cast_input.vv
14 lines · 12 sloc · 229 bytes · 9099594a495840dfe1b7b93d3a01e7004756abb6
Raw
1import v.ast { InfixExpr }
2import v.table { Type }
3
4fn test_as() {
5 _ := sum_expr() as InfixExpr
6 _ := sum_expr() as ast.PrefixExpr
7}
8
9fn test_cast() {
10 _ := f32(0)
11 _ := Type(0)
12 _ := ast.Expr(sum_expr())
13 _ := unsafe { nil }
14}
15