Address JDK8/JDK6 issues with computeIfAbsent

This commit is contained in:
Irene Dea
2021-12-01 14:09:54 -08:00
committed by Dmitriy Novozhilov
parent 374d287d08
commit 3c4989b672
8 changed files with 45 additions and 6 deletions
@@ -5,6 +5,7 @@
package org.jetbrains.kotlin.test.services
import org.jetbrains.kotlin.fir.util.ConeTypeRegistry
import org.jetbrains.kotlin.util.ArrayMapAccessor
import org.jetbrains.kotlin.util.ComponentArrayOwner
import org.jetbrains.kotlin.util.NullableArrayMapAccessor
@@ -28,7 +29,7 @@ class TestServices : ComponentArrayOwner<TestService, TestService>(){
override val typeRegistry: TypeRegistry<TestService, TestService>
get() = Companion
companion object : TypeRegistry<TestService, TestService>() {
companion object : ConeTypeRegistry<TestService, TestService>() {
inline fun <reified T : TestService> testServiceAccessor(): ArrayMapAccessor<TestService, TestService, T> {
return generateAccessor(T::class)
}