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

pull/9349/head
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
1 changed files with 3 additions and 0 deletions

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')
}
}