// !LANGUAGE: +NewInference // !DIAGNOSTICS: -UNUSED_PARAMETER import kotlin.reflect.KProperty1 import kotlin.reflect.KMutableProperty1 class Inv { val size: Int = 0 } class DTO { val test: Inv? = null var q: Int = 0 operator fun get(prop: KProperty1<*, R>): R = TODO() operator fun set(prop: KMutableProperty1<*, R>, value: R) { } } fun main(intDTO: DTO?) { if (intDTO != null) { intDTO[DTO::q] = intDTO[DTO::test]!!.size intDTO[DTO::q] = intDTO[DTO::test]!!.size } }