errors and warnings / classes / W3031
W3031 warning
@inline ignored
- area
- classes (x3xxx)
- fails the build
- with --deny-warnings
@inline is ignored: the function can't be inlined. Only a local function
or a private method is inlined: one whose body is a single return
expression wherever it is called, one whose body is statements (without an
early return or a return with values) where a call of it is a statement
of its own; and only when it isn't recursive and (a local function) is used
only by calling it. The warning says which rule failed: a statement body
none of whose calls is a statement (or a build that keeps lines,
line-mode "preserve"), one longer than 12 statements called more than
once, and a function that uses levels of the call stack (setfenv,
getfenv, error with a level, debugstack) are reported too. A private method is inlined where its class
calls it, as no other code can call it or replace it. A public or protected
method, or a function that isn't local (function f(), function t.f()),
is reported too. Simplify the function, make the method private, or remove
the hint.
The warning comes from wowlua build with a profile that inlines
(optimize.inline, on in release), not from wowlua check.
Offline
$ wowlua explain W3031 W3031 (warning): @inline ignored