luau icon indicating copy to clipboard operation
luau copied to clipboard

error location reported incorrectly when comparing two things that cannot be compared

Open jackdotink opened this issue 5 months ago • 0 comments

This code reports a type error for the entirety of the if statement's condition, when the error should only be reported for the right side of the and:

local t = {}
local a = t[1]
local b = 10

if a ~= nil and b ~= nil then end```

jackdotink avatar Sep 17 '24 18:09 jackdotink