Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionGet.kt
T
Svetlana Isakova f41584c7ab tests added
for inference for delegated properties
2013-06-06 16:31:06 +04:00

33 lines
626 B
Kotlin

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