mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: don't disallow closures in the JS backend (#9884)
This commit is contained in:
parent
f5ce9388de
commit
9d68f924c3
@ -590,7 +590,9 @@ fn (mut p Parser) anon_fn() ast.AnonFn {
|
|||||||
return ast.AnonFn{}
|
return ast.AnonFn{}
|
||||||
}
|
}
|
||||||
p.open_scope()
|
p.open_scope()
|
||||||
p.scope.detached_from_parent = true
|
if p.pref.backend != .js {
|
||||||
|
p.scope.detached_from_parent = true
|
||||||
|
}
|
||||||
// TODO generics
|
// TODO generics
|
||||||
args, _, is_variadic := p.fn_args()
|
args, _, is_variadic := p.fn_args()
|
||||||
for arg in args {
|
for arg in args {
|
||||||
|
Loading…
Reference in New Issue
Block a user