markused: fix thread type mark by go/spawn expr (fix #25049) (#25054)

This commit is contained in:
Felipe Pena 2025-08-06 17:07:44 -03:00 committed by GitHub
parent c3dc07520e
commit cd7e9a1268
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -519,6 +519,7 @@ fn (mut w Walker) expr(node_ ast.Expr) {
if node.is_expr {
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.uses_spawn = true

View File

@ -0,0 +1,13 @@
fn f() ! {
println('hi')
}
fn g() int {
println('hi')
return 23
}
fn test_main() {
_ = go f()
_ := spawn g()
}