vfmt: always walk over all comptime branches

pull/4581/head
Delyan Angelov 2020-04-24 19:05:55 +03:00
parent f6f204387d
commit 8be10ffbd6
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ fn (mut p Parser) comp_if() ast.CompIf {
// `$if os {` for a different target, skip everything inside
// to avoid compilation errors (like including <windows.h> or calling WinAPI fns
// on non-Windows systems)
if ((!is_not && os != p.pref.os) || (is_not && os == p.pref.os)) && !p.pref.output_cross_c {
if !p.scanner.is_fmt && ((!is_not && os != p.pref.os) || (is_not && os == p.pref.os)) && !p.pref.output_cross_c {
skip_os = true
p.check(.lcbr)
// p.warn('skipping $if $val os=$os p.pref.os=$p.pref.os')