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

ci: fix for -autofree vlib/v/tests/option_test.v

This commit is contained in:
Delyan Angelov 2021-03-17 14:44:45 +02:00
parent d76e78719c
commit e8df8bc8c3
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -2699,6 +2699,9 @@ fn (mut g Gen) autofree_var_call(free_fn_name string, v ast.Var) {
if v.typ.is_ptr() {
g.writeln('\t${free_fn_name}(${c_name(v.name)}); // autofreed ptr var')
} else {
if v.typ == table.error_type && !v.is_autofree_tmp {
return
}
g.writeln('\t${free_fn_name}(&${c_name(v.name)}); // autofreed var $g.cur_mod.name $g.is_builtin_mod')
}
}