sylvanaar / IDLua

Lua For IntelliJ IDEA
Apache License 2.0
58 stars 19 forks source link

Unused assignment with classing #15

Open QartemisT opened 4 years ago

QartemisT commented 4 years ago

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
sylvanaar commented 4 years ago

Which version is this for?

QartemisT commented 4 years ago

The latest version (1.0.127)

acanthite1855 commented 4 years ago

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

arafatx commented 3 years ago

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