f4f1ea91d9
When generating collection element receiver (such as 'a[i]'), accessible descriptor for get/set operator should be used. Otherwise, if the corresponding get/set operator fun is called via an accessor, its argument types may be different in case of generic fun specialized with primitive types. #KT-20387 Fixed
17 lines
269 B
Kotlin
Vendored
17 lines
269 B
Kotlin
Vendored
// FILE: test.kt
|
|
import base.*
|
|
|
|
class Derived : Base<Long>() {
|
|
inner class Inner {
|
|
fun foo() = this@Derived[0L]
|
|
}
|
|
}
|
|
|
|
fun box() = Derived().Inner().foo()
|
|
|
|
// FILE: Base.kt
|
|
package base
|
|
|
|
open class Base<K> {
|
|
protected operator fun get(key: K) = "OK"
|
|
} |