https://kotlinlang.org logo
#announcements
Title
# announcements
k

kschlesselmann

07/05/2019, 8:10 AM
Anyone an idea why IDEA complains about that? The code compiles fine
The involved
cache
is
Copy code
private val cache: Cache<String, Signal<out AttributeDefinition>> = Caffeine.newBuilder()
            .maximumSize(500)
            .expireAfterWrite(Duration.ofMinutes(5))
            .build()
and the call to
CacheMono
looks like
Copy code
fun findByName(name: String): Mono<AttributeDefinition> = CacheMono
            .lookup(cache.asMap(), name)
            .onCacheMissResume(findByNameRemote(name))
It compiles, all tests are running fine …
k

kralli

07/05/2019, 8:13 AM
Looks like a regression of the new type inference.
k

kschlesselmann

07/05/2019, 8:14 AM
@kralli So only in the IDEA plugin? My kotlin version is 1.3.41 as well … shouldn't they both use the same type inference?
k

kralli

07/05/2019, 8:17 AM
No, since Kotlin 1.3.40 IDEA uses a new type inference. The command line compiler still uses the old one in order to not break everything, until they have found all the deviations between the versions. You can read about it here https://blog.jetbrains.com/kotlin/2019/06/kotlin-1-3-40-released/
Because this is a regression, I have created an Issue: https://youtrack.jetbrains.com/issue/KT-32434
👍🏻 1
4 Views