Don't suggest indirection for 'declare var$n=foo'

This commit is contained in:
Vidar Holen
2017-03-18 14:54:52 -07:00
parent 82c3084438
commit 2688a81526
3 changed files with 10 additions and 8 deletions

View File

@@ -223,10 +223,7 @@ isQuoteFreeNode strict tree t =
TA_Sequence {} -> return True
T_Arithmetic {} -> return True
T_Assignment {} -> return True
T_Redirecting {} -> return $
if strict then False else
-- Not true, just a hack to prevent warning about non-expansion refs
any (isCommand t) ["local", "declare", "typeset", "export", "trap", "readonly"]
T_Redirecting {} -> return False
T_DoubleQuoted _ _ -> return True
T_DollarDoubleQuoted _ _ -> return True
T_CaseExpression {} -> return True