rokucommunity / bslint

A linter for BrightScript and BrighterScript.
MIT License
28 stars 15 forks source link

Unsafe code path narrowing #9

Closed elsassph closed 4 years ago

elsassph commented 4 years ago

Currently this would be an error:

if a = 1
  b = 1
end if
print b 'error

Maybe the linter could be smart enough to recognize that this is safe:

if a = 1
  b = 1
end if
if b <> invalid
  print b 'ok
end if