mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
fix
This commit is contained in:
parent
c3dc07520e
commit
3f9f848783
2 changed files with 14 additions and 0 deletions
|
@ -519,6 +519,7 @@ fn (mut w Walker) expr(node_ ast.Expr) {
|
||||||
if node.is_expr {
|
if node.is_expr {
|
||||||
w.fn_by_name('free')
|
w.fn_by_name('free')
|
||||||
}
|
}
|
||||||
|
w.mark_by_type(w.table.find_or_register_thread(node.call_expr.return_type))
|
||||||
w.expr(node.call_expr)
|
w.expr(node.call_expr)
|
||||||
w.uses_spawn = true
|
w.uses_spawn = true
|
||||||
|
|
||||||
|
|
13
vlib/v/tests/concurrency/thread_type_test.v
Normal file
13
vlib/v/tests/concurrency/thread_type_test.v
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
fn f() ! {
|
||||||
|
println('hi')
|
||||||
|
}
|
||||||
|
|
||||||
|
fn g() int {
|
||||||
|
println('hi')
|
||||||
|
return 23
|
||||||
|
}
|
||||||
|
|
||||||
|
fn test_main() {
|
||||||
|
_ = go f()
|
||||||
|
_ := spawn g()
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue