mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
18 lines
298 B
Kotlin
Vendored
18 lines
298 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
import kotlin.reflect.KProperty1
|
|
|
|
class Sample(val str: String)
|
|
|
|
class Inv<T>
|
|
|
|
class Form {
|
|
operator fun <F> get(field: KProperty1<*, F>): Inv<F> = TODO()
|
|
}
|
|
|
|
fun <K> foo(i: Inv<K>) {}
|
|
|
|
fun test(f: Form) {
|
|
foo(f[Sample::str])
|
|
} |