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) }