1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: fix #define check on windows

This commit is contained in:
Alexander Medvednikov 2022-07-11 00:20:12 +03:00
parent 22dac71b33
commit bfcf5b13ed

View File

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