mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 04:40:59 +01:00
36651: WARN_CREATE_GLOBAL += math expressions
Without this, '() { (( x=42 )) }' and '() { for (( i=0; … )) }' wouldn't warn
about $x and $i, respectively, being created global.
This commit is contained in:
parent
36abe20c0f
commit
2654cb43f6
5 changed files with 38 additions and 2 deletions
|
|
@ -746,7 +746,8 @@ pindex(NOWARNCREATEGLOBAL)
|
|||
cindex(parameters, warning when created globally)
|
||||
item(tt(WARN_CREATE_GLOBAL))(
|
||||
Print a warning message when a global parameter is created in a function
|
||||
by an assignment. This often indicates that a parameter has not been
|
||||
by an assignment or in math context.
|
||||
This often indicates that a parameter has not been
|
||||
declared local when it should have been. Parameters explicitly declared
|
||||
global from within a function using tt(typeset -g) do not cause a warning.
|
||||
Note that there is no warning when a local parameter is assigned to in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue