mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 21:11:35 -07:00
In (( x = y )), logic to not reference x also grabbed y
This commit is contained in:
parent
47fd16b8e8
commit
85e69f86eb
2 changed files with 2 additions and 1 deletions
|
@ -520,7 +520,7 @@ getReferencedVariables parents t =
|
|||
isDereferencing = (`elem` ["-eq", "-ne", "-lt", "-le", "-gt", "-ge"])
|
||||
|
||||
isArithmeticAssignment t = case getPath parents t of
|
||||
this: TA_Assignment _ "=" _ _ :_ -> True
|
||||
this: TA_Assignment _ "=" lhs _ :_ -> lhs == t
|
||||
_ -> False
|
||||
|
||||
dataTypeFrom defaultType v = (case v of T_Array {} -> DataArray; _ -> defaultType) $ SourceFrom [v]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue