cgen: disable C static fn attribute with -cg (improves backtraces)

pull/5000/head
Delyan Angelov 2020-05-23 14:04:02 +03:00
parent 43eaec325d
commit 4271eb477c
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ fn (mut g Gen) gen_fn_decl(it ast.FnDecl) {
g.write('$type_name ${impl_fn_name}(')
}
} else {
if !it.is_pub {
if !(it.is_pub || g.pref.is_debug) {
g.write('static ')
g.definitions.write('static ')
}