In (( x = y )), logic to not reference x also grabbed y

This commit is contained in:
Vidar Holen 2016-05-24 09:12:47 -07:00
parent 47fd16b8e8
commit 85e69f86eb
2 changed files with 2 additions and 1 deletions

View file

@ -2071,6 +2071,7 @@ prop_checkUnused30= verifyTree checkUnusedAssignments "let a=1"
prop_checkUnused31= verifyTree checkUnusedAssignments "let 'a=1'"
prop_checkUnused32= verifyTree checkUnusedAssignments "let a=b=c; echo $a"
prop_checkUnused33= verifyNotTree checkUnusedAssignments "a=foo; [[ foo =~ ^{$a}$ ]]"
prop_checkUnused34= verifyNotTree checkUnusedAssignments "foo=1; (( t = foo )); echo $t"
checkUnusedAssignments params t = execWriter (mapM_ warnFor unused)
where
flow = variableFlow params