errors and warnings / types / W2055
W2055 warning
Too many arguments to an unannotated function (basic mode). Replaces the second meaning of W2006.
- area
- types (x2xxx)
- fails the build
- with --deny-warnings
Basic mode: a call passes more arguments than a function without any annotations takes. Lua drops the extra ones. It is a warning because plain Lua code often does this on purpose; in strict mode it is E2006. Remove the extra arguments or add the parameters.
Example
local function add(a, b) return a + bendprint(add(1, 2, 3))local function add(a, b) return a + bendprint(add(1, 2))The compiler reports it like this:
warning[W2055]: too many arguments: expected 2, got 3 ┌─ src/main.wowlua:4:17 │ 4 │ print(add(1, 2, 3)) │ ^ here
Related codes
| code | message |
|---|---|
| E2006 | Too many arguments |
Offline
$ wowlua explain W2055 W2055 (warning): Too many arguments to an unannotated function (basic mode). Replaces the second meaning of W2006.