return statement.
If the unused expression is the last statement in a function and its type matches the function's return type,
a quick fix is available to automatically add the return keyword.
Example:
fun example(): Int {
val x = 10
x // Warning: Expression is unused
}
After the quick-fix is applied:
fun example(): Int {
val x = 10
return x
}