Fixed accidentally ignored undef warning for ${#foo}

This commit is contained in:
Vidar Holen 2015-03-07 23:01:34 -08:00
parent 2c2e41952f
commit dcc10bbdf6
1 changed files with 2 additions and 2 deletions

View File

@ -2594,7 +2594,7 @@ prop_checkUnassignedReferences17= verifyNotTree checkUnassignedReferences "USERS
prop_checkUnassignedReferences18= verifyNotTree checkUnassignedReferences "FOOBAR=42; export FOOBAR="
prop_checkUnassignedReferences19= verifyNotTree checkUnassignedReferences "readonly foo=bar; echo $foo"
prop_checkUnassignedReferences20= verifyNotTree checkUnassignedReferences "printf -v foo bar; echo $foo"
prop_checkUnassignedReferences21= verifyTree checkUnassignedReferences "echo ${#foo}"
checkUnassignedReferences params t = warnings
where
(readMap, writeMap) = execState (mapM tally $ variableFlow params) (Map.empty, Map.empty)
@ -2650,7 +2650,7 @@ checkUnassignedReferences params t = warnings
isInArray var t = any isArray $ getPath (parentMap params) t
where
isArray (T_Array {}) = True
isArray (T_DollarBraced _ l) | var /= bracedString l = True
isArray (T_DollarBraced _ l) | var /= getBracedReference (bracedString l) = True
isArray _ = False
isGuarded (T_DollarBraced _ v) =