errors and warnings / parsing / E0109
E0109 error
Decorator not followed by a decoratable declaration
- area
- parsing (x01xx)
- fails the build
- yes
A decorator (@name or @name(…)) stands before a statement that can't be
decorated, such as a call or an assignment. Decorators apply to declarations:
functions, local, const, classes, class members, enums and the like. Put
the decorator right before the declaration it is meant for.
Example
@deprecatedprint("old API")@deprecatedlocal function oldApi() print("old API")endThe compiler reports it like this:
error[E0109]: a decorator must be followed by a declaration (function, local, const, class, …) ┌─ src/main.wowlua:1:1 │ 1 │ ╭ @deprecated 2 │ │ print("old API") │ ╰────────────────^ here
Offline
$ wowlua explain E0109 E0109 (error): Decorator not followed by a decoratable declaration