diff --git a/vlib/v/gen/c/text_manipulation.v b/vlib/v/gen/c/text_manipulation.v index 8bfe511b5c..2394423544 100644 --- a/vlib/v/gen/c/text_manipulation.v +++ b/vlib/v/gen/c/text_manipulation.v @@ -7,7 +7,11 @@ import v.util fn (mut g Gen) write(s string) { $if trace_gen ? { - eprintln('gen file: ${g.file.path:-30} | last_fn_c_name: ${g.last_fn_c_name:-45} | write: $s') + if g.file == unsafe { nil } { + eprintln('gen file: | last_fn_c_name: ${g.last_fn_c_name:-45} | write: $s') + } else { + eprintln('gen file: ${g.file.path:-30} | last_fn_c_name: ${g.last_fn_c_name:-45} | write: $s') + } } if g.indent > 0 && g.empty_line { g.out.write_string(util.tabs(g.indent)) @@ -20,7 +24,11 @@ fn (mut g Gen) write(s string) { fn (mut g Gen) writeln(s string) { $if trace_gen ? { - eprintln('gen file: ${g.file.path:-30} | last_fn_c_name: ${g.last_fn_c_name:-45} | writeln: $s') + if g.file == unsafe { nil } { + eprintln('gen file: | last_fn_c_name: ${g.last_fn_c_name:-45} | writeln: $s') + } else { + eprintln('gen file: ${g.file.path:-30} | last_fn_c_name: ${g.last_fn_c_name:-45} | writeln: $s') + } } if g.indent > 0 && g.empty_line { g.out.write_string(util.tabs(g.indent))