From ec7a42b0c202f5863b95f0091c3f8637c5ee8d26 Mon Sep 17 00:00:00 2001 From: Ryan Bullock Date: Wed, 1 Nov 2023 15:44:23 -0700 Subject: [PATCH] Check for nil config before setting program level flag --- compiler/compiler.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/compiler.go b/compiler/compiler.go index 6681d96e..315414df 100644 --- a/compiler/compiler.go +++ b/compiler/compiler.go @@ -57,7 +57,10 @@ func Compile(tree *parser.Tree, config *conf.Config) (program *Program, err erro Arguments: c.arguments, Functions: c.functions, DebugInfo: c.debugInfo, - ExprNative: config.ExprNative, + } + + if config != nil { + program.ExprNative = config.ExprNative } return }