Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionGet.kt
T
2015-10-14 01:29:09 +03:00

33 lines
668 B
Kotlin
Vendored

package foo
class A1 {
val a: String by MyProperty1()
}
class MyProperty1 {}
operator fun MyProperty1.getValue(thisRef: Any?, desc: PropertyMetadata): String {
throw Exception("$thisRef $desc")
}
//--------------------
class A2 {
val a: String by MyProperty2()
}
class MyProperty2<T> {}
operator fun <T> MyProperty2<T>.getValue(thisRef: Any?, desc: PropertyMetadata): T {
throw Exception("$thisRef $desc")
}
//--------------------
class A3 {
val a: String by MyProperty3()
class MyProperty3<T> {}
operator fun <T> MyProperty3<T>.getValue(thisRef: Any?, desc: PropertyMetadata): T {
throw Exception("$thisRef $desc")
}
}