mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
parent
6ca0976896
commit
d6031bae10
2 changed files with 7 additions and 1 deletions
|
@ -872,8 +872,8 @@ fn (mut g JsGen) expr(node_ ast.Expr) {
|
|||
g.gen_array_init_expr(node)
|
||||
}
|
||||
ast.AsCast {
|
||||
// skip: JS has no types, so no need to cast
|
||||
// TODO: Is jsdoc needed here for TS support?
|
||||
g.expr(node.expr)
|
||||
}
|
||||
ast.Assoc {
|
||||
// TODO
|
||||
|
|
6
vlib/v/gen/js/tests/casting.v
Normal file
6
vlib/v/gen/js/tests/casting.v
Normal file
|
@ -0,0 +1,6 @@
|
|||
type Type = string | bool
|
||||
|
||||
fn main() {
|
||||
t := Type('')
|
||||
assert t is string && t == ''
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue