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

v: support for $if threads {}, depending on whether go ` was used at all (#10227)

This commit is contained in:
Delyan Angelov
2021-05-27 18:36:07 +03:00
committed by GitHub
parent 6cdc7646b8
commit 2b62dca000
7 changed files with 33 additions and 1 deletions

View File

@@ -520,6 +520,7 @@ fn (mut p Parser) go_expr() ast.GoExpr {
}
pos := spos.extend(p.prev_tok.position())
p.register_auto_import('sync.threads')
p.table.gostmts++
return ast.GoExpr{
call_expr: call_expr
pos: pos