From b99eb75908304d84fbc729ea4209642bb3d82a1c Mon Sep 17 00:00:00 2001 From: Daniel Gavin Date: Tue, 28 Sep 2021 15:30:13 +0200 Subject: Fix incorrect handling of functions in when clauses using ODIN_OS --- src/common/ast.odin | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/ast.odin b/src/common/ast.odin index ceda09c..3589848 100644 --- a/src/common/ast.odin +++ b/src/common/ast.odin @@ -103,8 +103,7 @@ collect_globals :: proc(file: ast.File, skip_private := false) -> []GlobalExpr { } if ident != nil && basic_lit != nil { - - if ident.name == "ODIN_OS" && basic_lit.tok.text == ODIN_OS { + if ident.name == "ODIN_OS" && basic_lit.tok.text[1:len(basic_lit.tok.text)-1] == ODIN_OS { if block, ok := when_decl.body.derived.(ast.Block_Stmt); ok { for stmt in block.stmts { -- cgit v1.2.3