Jakub Pi
03/18/2020, 3:33 AMsealed class Permit<K> {
companion object {
operator fun <K> invoke(lookup : K, permission : Permissions) = FailedPermit(lookup, permission)
}
class FailedPermit<K>(val lookup : K, val permission : Permissions) : Permit<K>()
fun orElse(closure : (K, Permissions) -> Unit) = when (this) { //Dies on this line
is FailedPermit -> closure(lookup, permission)
else -> {}
}
}
I've trimmed the code to just the necessary bits. Permissions is just a simple enum class.Jakub Pi
03/18/2020, 3:34 AM2020-03-17 23:23:21,834 [ 759312] ERROR - aemon.impl.PassExecutorService - IntelliJ IDEA 2019.3.4 Build #IC-193.6911.18
2020-03-17 23:23:21,834 [ 759312] ERROR - aemon.impl.PassExecutorService - JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2020-03-17 23:23:21,835 [ 759313] ERROR - aemon.impl.PassExecutorService - OS: Windows 10
2020-03-17 23:23:21,835 [ 759313] ERROR - aemon.impl.PassExecutorService - Plugin to blame: Kotlin version: 1.3.70-release-IJ2019.3-1
2020-03-17 23:23:21,835 [ 759313] ERROR - aemon.impl.PassExecutorService - Last Action: $Undo
2020-03-17 23:23:21,835 [ 759313] ERROR - aemon.impl.PassExecutorService - Kotlin resolution encountered a problem while analyzing KtCallExpression
org.jetbrains.kotlin.idea.caches.resolve.KotlinIdeaResolutionException: Kotlin resolution encountered a problem while analyzing KtCallExpression
...
Caused by: org.jetbrains.kotlin.util.ReenteringLazyValueComputationException
dfriehs
03/18/2020, 5:28 AMorElse
as Unit
, but not before.Alexey Belkov [JB]
03/18/2020, 10:07 AMJakub Pi
03/18/2020, 1:58 PM