ci: fix for `-autofree vlib/v/tests/option_test.v`
parent
d76e78719c
commit
e8df8bc8c3
|
@ -2699,6 +2699,9 @@ fn (mut g Gen) autofree_var_call(free_fn_name string, v ast.Var) {
|
||||||
if v.typ.is_ptr() {
|
if v.typ.is_ptr() {
|
||||||
g.writeln('\t${free_fn_name}(${c_name(v.name)}); // autofreed ptr var')
|
g.writeln('\t${free_fn_name}(${c_name(v.name)}); // autofreed ptr var')
|
||||||
} else {
|
} 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')
|
g.writeln('\t${free_fn_name}(&${c_name(v.name)}); // autofreed var $g.cur_mod.name $g.is_builtin_mod')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue