IDLua icon indicating copy to clipboard operation
IDLua copied to clipboard

Unused assignment when not checking

Open QartemisT opened this issue 4 years ago • 1 comments

When defining a variable, and then checking if it doesn't exist and overriding it, it flags the original as unused.

Example:

local test = _G["Test"] -- This is flag as unused

if not test then
	test = CreateFrame("Frame", "Test")
end

test:SomeFunc()

QartemisT avatar Jun 28 '20 08:06 QartemisT

Edit;

This appears to have just been started with the latest update, caused by https://github.com/sylvanaar/IDLua/commit/3901ebf3e55d260156124c7a190e42a08466ef17

QartemisT avatar Jun 28 '20 08:06 QartemisT