errors and warnings / classes / E3047
E3047 error
overload function signature not followed by its implementation
- area
- classes (x3xxx)
- fails the build
- yes
An overload function signature isn't followed right away by its
implementation: a function of the same name (function, local function or
export function) must come directly after the signatures. Move the
implementation up, or add it.
Example
overload function size(s: string): numberlocal count = 0local function size(v: string): number return #vendprint(size("a"), count)local count = 0overload function size(s: string): numberlocal function size(v: string): number return #vendprint(size("a"), count)The compiler reports it like this:
error[E3047]: the overload signature of `size` is not followed by its implementation ┌─ src/main.wowlua:1:19 │ 1 │ overload function size(s: string): number │ ^^^^ here
Related codes
| code | message |
|---|---|
| E3044 | Overload implementation does not accept every overload signature |
Offline
$ wowlua explain E3047 E3047 (error): overload function signature not followed by its implementation