Edoardo Luppi
12/15/2025, 10:50 AMArtem Kobzar
12/15/2025, 11:28 AMArtem Kobzar
12/15/2025, 11:29 AMdmitriy.novozhilov
12/15/2025, 11:34 AMRobert Jaros
12/15/2025, 11:39 AMdmitriy.novozhilov
12/15/2025, 11:42 AMfun foo(): String = "hello"
fun test() {
foo() // warning: result of `foo()` is not used
val _ = foo() // green code
}
The main use-case for them is to provide a syntax to "consume" the value which should be used but you actually don't want it.
For more details check the KEEP which I linked in the previous message.Edoardo Luppi
12/15/2025, 12:05 PMdmitriy.novozhilov
12/15/2025, 12:05 PMEdoardo Luppi
12/15/2025, 12:05 PM