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

cgen: add an earlier error, to pin point the use of closures on windows

This commit is contained in:
Delyan Angelov 2022-02-09 08:35:11 +02:00
parent dd835acb8d
commit 356ccf247f
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -286,6 +286,9 @@ fn (mut g Gen) gen_fn_decl(node &ast.FnDecl, skip bool) {
g.definitions.write_string(s)
g.write(s)
g.nr_closures++
if g.pref.os == .windows {
g.error('closures are not yet implemented on windows', node.pos)
}
}
arg_str := g.out.after(arg_start_pos)
if node.no_body || ((g.pref.use_cache && g.pref.build_mode != .build_module) && node.is_builtin