errornames, globals, modules, conditional compilation
E1004error
A parameter's default reads that parameter or a later one, which is not set yet (in Lua every parameter is in scope there, so the name is the parameter, not an outer one)
- area
- names, globals, modules, conditional compilation
- fails the build
- yes
- in plain Lua
- W1004
Errors fail the build. Run wowlua explain E1004 for this summary in the terminal.
Related: W1004, the warning form: Local shadows another local; also a parameter named self inside a class's method or constructor, which hides the instance (a plain function M:m()'s self may be shadowed, as frame handlers do)
Where the specification covers it
- Appendix C. Decision Log · Language
- 1. Syntax · 1.3.5 Functions: types, generics, defaults
Nearby codes
| code | summary |
|---|---|
| E1001 | Undefined global read (strict mode) |
| E1002 | Implicit global assignment (strict mode) |
| E1003 | Undefined local or upvalue in a wowlua construct (e.g. a decorator argument) |
| E1010 | Assignment to an exported or imported binding |
| E1011 | Top-level import after another (non-import) statement |
| E1012 | Module has no export with this name |