IDLua icon indicating copy to clipboard operation
IDLua copied to clipboard

Unused assignment with classing

Open QartemisT opened this issue 4 years ago • 4 comments

When using Lua classing, it reports the main variable as "unused" invalidly.

Example;

local test = {} -- This is flagged as unused

function test:SomeFunc()
	print("Hello world")
end

QartemisT avatar Jun 28 '20 08:06 QartemisT

Which version is this for?

sylvanaar avatar Jun 28 '20 14:06 sylvanaar

The latest version (1.0.127)

QartemisT avatar Jun 28 '20 17:06 QartemisT

I also have the same issue with the latest version (1.0.127) for any variable/function parameter upon their declaration.

You can see it on the screenshot below. Every parameter of animation function as well as the three DEFAULT_* variables are treated as Unused assignment (and highlighted with gray color), however all of them are used. image

acanthite1855 avatar Aug 05 '20 17:08 acanthite1855

Ok, I have too many warning for this. Anyway to ignore this syntax rule ?

function init()
    local needs = {} -- unused assignment
    needs["type"] = "packet"
    needs["filter"] = "alerts"
    return needs
end

arafatx avatar Nov 21 '20 04:11 arafatx