docs/_docs/reference/error-codes/E118.md
This error is emitted when the inline modifier is used on parameters of a non-inline method.
The inline modifier on parameters is only allowed for parameters of inline methods, where it enables the parameter to be inlined at the call site.
def example(inline x: Int): Int = x + 1
-- [E118] Syntax Error: example.scala:1:19 -------------------------------------
1 |def example(inline x: Int): Int = x + 1
| ^
| inline modifier can only be used for parameters of inline methods
// Make the method inline as well
inline def example(inline x: Int): Int = x + 1
// Or remove inline from the parameter
def example(x: Int): Int = x + 1