rokucommunity / bslint

A linter for BrightScript and BrighterScript.
MIT License
27 stars 14 forks source link

Setting variable inside loop after it is read is declared as unused #67

Closed triwav closed 1 year ago

triwav commented 2 years ago

Take the example

myValue = initialValue
while true
  if myValue = invalid
    exit while
  else if otherStuff
  end if

  myValue = getValue()
end while

the line myValue = getValue() will be declared as unused when it will be used during the next loop.

elsassph commented 1 year ago

Right, we have the same problem with goto loops.

elsassph commented 1 year ago

duplicate of #66