diff --git a/vlib/builtin/utf8.v b/vlib/builtin/utf8.v index c3352bc0a2..84fbdab0ea 100644 --- a/vlib/builtin/utf8.v +++ b/vlib/builtin/utf8.v @@ -85,7 +85,7 @@ pub fn (_rune string) utf32_code() int { for i := 1; i < _rune.len; i++ { c := int(_rune[i]) res = res << shift - res |= c & 63 /* 0x3f */ + res |= c & 63 // 0x3f shift = 6 } return res diff --git a/vlib/compiler/comptime.v b/vlib/compiler/comptime.v index 5510ea8ac3..4fd50ffa91 100644 --- a/vlib/compiler/comptime.v +++ b/vlib/compiler/comptime.v @@ -31,12 +31,15 @@ fn (p mut Parser) comp_time() { } p.check(.lcbr) os := os_from_string(name) - if false && p.fileis('runtime.v') && os != p.os { + if (!not && os != p.os) || (not && os == p.os) { // `$if os {` for a different target, skip everything inside // to avoid compilation errors (like including // on non-Windows systems) mut stack := 1 for { + if p.tok == .key_return { + p.returns = true + } if p.tok == .lcbr { stack++ } else if p.tok == .rcbr {