Edoardo Luppi
01/09/2024, 11:14 AMpublic fun findLine(i: Int, required: Boolean): LineContext?
Can I describe that when required
is hardcoded to true
the return type is not-null with contracts? E.g.
val result = findLine(0, true)
// result is of type LineContext. Note the missing ?
Youssef Shoaib [MOD]
01/09/2024, 12:30 PMpublic fun findLineOrNull(i: Int): LineContext?
public fun findLine(i: Int): LineContext
Rob Elliot
01/09/2024, 12:31 PMpublic fun findLine(i: Int): LineContext = findLine(i, true) ?: throw IllegalStateException("result should never be null if required is true")
Edoardo Luppi
01/10/2024, 10:57 AM