We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3dc075 commit cd7e9a1Copy full SHA for cd7e9a1
2 files changed
vlib/v/markused/walker.v
@@ -519,6 +519,7 @@ fn (mut w Walker) expr(node_ ast.Expr) {
519
if node.is_expr {
520
w.fn_by_name('free')
521
}
522
+ w.mark_by_type(w.table.find_or_register_thread(node.call_expr.return_type))
523
w.expr(node.call_expr)
524
w.uses_spawn = true
525
vlib/v/tests/concurrency/thread_type_test.v
@@ -0,0 +1,13 @@
1
+fn f() ! {
2
+ println('hi')
3
+}
4
+
5
+fn g() int {
6
7
+ return 23
8
9
10
+fn test_main() {
11
+ _ = go f()
12
+ _ := spawn g()
13
0 commit comments