Skip to content

Commit 38185a0

Browse files
committed
fix analyzer crash
1 parent ab3f95e commit 38185a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nattlua/analyzer/base/base_analyzer.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ return function(META)
6262
out = out or {}
6363

6464
for _, expression in ipairs(expressions) do
65-
local obj = self:AnalyzeExpression(expression)
65+
local obj, err = self:AnalyzeExpression(expression)
66+
if not obj then self:Error(err) obj = Any() end
67+
6668

6769
if obj and obj.Type == "tuple" and obj:HasOneValue() then
6870
obj = obj:GetWithNumber(1)

0 commit comments

Comments
 (0)