Unused return value checker #464
Replies: 2 comments 4 replies
-
|
In the Expression return value usage section, it says a return value I don't think that's true for all lambdas. Specifically, |
Beta Was this translation helpful? Give feedback.
-
|
It seems inconsistent that boolean operators like
But the former will produce a warning and the latter won't. Why make those cases different? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a place to discuss Unused return value checker proposal. The text of the proposal is located here.
This proposal depends on the other sub-proposal, Underscore for unused local variables, located here.
Since both proposals are connected, we'll discuss them together.
The goal of the proposals is to enhance the functionality of the existing 'unused expression' diagnostic in the Kotlin compiler.
New diagnostic should be able to report complex expressions whose return values are meaningful (e.g., non-Unit) but are not used.
This discussion is a follow-up to the previous KEEP discussion format. See previous comments in the issue.
Checker is ready to try in Kotlin 2.3.0 starting from Beta1.
Beta Was this translation helpful? Give feedback.
All reactions