1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

js: handle Nil

This commit is contained in:
Alexander Medvednikov 2022-07-06 06:47:37 +03:00
parent c48ed52f43
commit 3f3fb5be47
2 changed files with 6 additions and 1 deletions

View File

@ -960,6 +960,9 @@ fn (mut g JsGen) expr(node_ ast.Expr) {
g.gen_lock_expr(node)
}
ast.NodeError {}
ast.Nil {
g.write('null')
}
ast.None {
g.write('none__')
}

View File

@ -56,7 +56,9 @@ fn normalise_fname(name string) string {
}
fn (mut runner NormalTestRunner) start(ntests int) {
unsafe {
runner.all_assertsions = []&VAssertMetaInfo{cap: 1000}
}
}
fn (mut runner NormalTestRunner) finish() {