From bfcf5b13ed54935f79e7f3828ca334d27f810bac Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 11 Jul 2022 00:20:12 +0300 Subject: [PATCH] checker: fix #define check on windows --- vlib/v/checker/checker.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 2683f9bbcc..76810d4acf 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -1902,7 +1902,7 @@ fn (mut c Checker) hash_stmt(mut node ast.HashStmt) { else { if node.kind == 'define' { if !c.is_builtin_mod && !c.file.path.ends_with('.c.v') - && !c.file.path.contains('vlib/') { + && !c.file.path.contains('vlib' + os.path_separator) { c.error("#define can only be used in vlib (V's standard library) and *.c.v files", node.pos) }