Variables which are updated get flagged as unused

Issue #131 new
Jon S Akhtar
repo owner created an issue
local a = 1

the first a gets flagged as unused.

Comments (3)

  1. Robert M.

    I guess this is related:

    local foo;
    local bar = true;
    if bar then
        foo = 1;  -- This one will be marked as unused.
    elseif not bar then
        foo = -1;
  2. Jon S Akhtar reporter

    Thats a dataflow/controlflow analysis problem. It is a separate bug. It need to try it out with foo=false too. There some checking in the control flow analysis for constant conditions. I am curious if it is related to that code or just a bug in if statement analysis

  3. Log in to comment