v0.13.17
errors and warnings / names

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.

codemessage
E1006A function reads or assigns a global that a file-level local of the same name, declared further down, hides after it (strict mode)

Offline

terminal
$ 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)

source on GitHub ↗