Files
codeql/java/ql/integration-tests/posix-only/kotlin/generic-extension-property/test.kt
Chris Smowton 45a4cd89a6 Kotlin: specialise extension receivers the same as other function parameters
This arises when a generic class extends one of its parameters; for example, `class G<T> { val T.v; get() = 1 }`, where specialisation `G<List>` should generate a method specialisation `getV(List)`.
2022-10-27 18:31:19 +01:00

9 lines
144 B
Kotlin

class KotlinClass<T> {
val T.kotlinVal: Int
get() = 1
}
fun kotlinUser(kc: KotlinClass<String>) = with(kc) { "hello world".kotlinVal }