Linting rules
E007: pure-function-call-unused
Checks for calls to `@pure` functions where the result is not used.
Metadata
Code:E007Rule:pure-function-call-unusedStatus: Stable sincev0.0.1Quick fix: not available
What it does
Checks for calls to @pure functions where the result is not used.
Why is this bad?
@pure functions have no side effects, so calling them without using the result is a no-op and likely a bug.
Example
@pure
fun add(a: int, b: int): int { return a + b; }
fun main() {
add(1, 2);}Last updated on