errors and warnings / names / W1006
W1006 warning
A function reads or assigns a global that a file-level local of the same name, declared further down, hides after it (basic mode)
- area
- names (x1xxx)
- fails the build
- with --deny-warnings
The basic-mode form of E1006: a function names a file-level local declared
further down the file, so it reads (or assigns) the global of that name
instead. Move the declaration above the function, or write _G.name to mean
the global.
Related codes
| code | message |
|---|---|
| E1006 | A function reads or assigns a global that a file-level local of the same name, declared further down, hides after it (strict mode) |
Offline
$ wowlua explain W1006 W1006 (warning): A function reads or assigns a global that a file-level local of the same name, declared further down, hides after it (basic mode)