lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

Advanced missing nil check

Open FlashHit opened this issue 3 years ago • 2 comments

This is probably really hard to "fix".

---@type table|nil
local blueprint = { x = 1 }
local hasBlueprint = true

if blueprint == nil then
	hasBlueprint = false
end

if hasBlueprint then
	error("no blueprint found")
end

local s = blueprint.x

grafik

FlashHit avatar Jun 15 '22 22:06 FlashHit

I don't know how to implement this feature

sumneko avatar Jun 16 '22 06:06 sumneko