mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 04:51:37 -07:00
Fixed missing Alive detection in current scope
This commit is contained in:
parent
a14d0a8790
commit
0fda08b36e
1 changed files with 2 additions and 1 deletions
|
@ -242,7 +242,8 @@ getVariableFlow t =
|
|||
|
||||
findSubshelled :: [StackData] -> [[(Id,String)]] -> (Map.Map String VariableState) -> State (Map.Map Id Metadata) ()
|
||||
findSubshelled [] _ _ = return ()
|
||||
findSubshelled ((Assignment x):rest) (scope:lol) deadVars = findSubshelled rest ((x:scope):lol) deadVars
|
||||
findSubshelled ((Assignment x@(id, str)):rest) (scope:lol) deadVars =
|
||||
findSubshelled rest ((x:scope):lol) $ Map.insert str Alive deadVars
|
||||
findSubshelled ((Reference (readId, str)):rest) scopes deadVars = do
|
||||
case Map.findWithDefault Alive str deadVars of
|
||||
Alive -> return ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue