toadzky
11/29/2024, 6:13 AMResult
class.
val terminatorCheck: Result<Boolean> = terminator.parse(input.slice(), null)
if (terminatorCheck.getOrThrow() == true) {
break
}
is throwing java.lang.ClassCastException: class kotlin.Result cannot be cast to class java.lang.Boolean
on the if-condition. i've tried stepping through and it all looks like it's set up correctly - the debugger shows that there's a boolean in the value
field and it's not a failure. any idea why value as T
from the inline function getOrThrow
would produce this error?toadzky
11/29/2024, 6:40 AMgetOrElse { ... }
, but not everywhere. the same code will sometimes pass and sometimes fail and i have no idea why it's inconsistentdmitriy.novozhilov
11/29/2024, 8:16 AMtoadzky
11/29/2024, 3:48 PM