comptime: fix `$if debug {}` when giving -cg or -d debug

pull/4563/head
Delyan Angelov 2020-04-23 18:03:07 +03:00
parent adb8fb1dc6
commit 4f4567513e
1 changed files with 3 additions and 2 deletions

View File

@ -199,8 +199,9 @@ pub fn (mut g Gen) init() {
}
g.comptime_defines.writeln('')
}
if g.pref.is_debug || 'debug' in g.pref.compile_defines {
g.comptime_defines.writeln('#define _VDEBUG (1)')
}
}
pub fn (mut g Gen) finish() {