[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
import kotlin.reflect.*
|
||||
|
||||
var x: Int = 42
|
||||
val y: String get() = "y"
|
||||
|
||||
fun testX() {
|
||||
val xx = ::x
|
||||
checkSubtype<KMutableProperty0<Int>>(xx)
|
||||
checkSubtype<KProperty0<Int>>(xx)
|
||||
checkSubtype<KMutableProperty<Int>>(xx)
|
||||
checkSubtype<KProperty<Int>>(xx)
|
||||
checkSubtype<KCallable<Int>>(xx)
|
||||
|
||||
checkSubtype<String>(xx.name)
|
||||
checkSubtype<Int>(xx.get())
|
||||
xx.set(239)
|
||||
}
|
||||
|
||||
fun testY() {
|
||||
val yy = ::y
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><KMutableProperty0<String>>(yy)
|
||||
checkSubtype<KProperty0<String>>(yy)
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><KMutableProperty<String>>(yy)
|
||||
checkSubtype<KProperty<String>>(yy)
|
||||
checkSubtype<KCallable<String>>(yy)
|
||||
|
||||
checkSubtype<String>(yy.name)
|
||||
checkSubtype<String>(yy.get())
|
||||
yy.<!UNRESOLVED_REFERENCE!>set<!>("yy")
|
||||
}
|
||||
Reference in New Issue
Block a user