Files
kotlin-fork/compiler/testData/diagnostics/tests/thisAndSuper/thisInFunctionLiterals.kt
T
Ilya Chernikov 6356807997 Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00

18 lines
668 B
Kotlin
Vendored

// !CHECK_TYPE
class A(val a:Int) {
inner class B() {
fun Byte.xx() : Double.() -> Any {
checkSubtype<Byte>(this)
val <!UNUSED_VARIABLE!>a<!>: Double.() -> Unit = {
checkSubtype<Double>(this)
checkSubtype<Byte>(this@xx)
checkSubtype<B>(this@B)
checkSubtype<A>(this@A)
}
val <!UNUSED_VARIABLE!>b<!>: Double.() -> Unit = a@{ checkSubtype<Double>(this@a) + checkSubtype<Byte>(this@xx) }
val <!UNUSED_VARIABLE!>c<!> = a@{ -> <!NO_THIS!>this@a<!> <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> checkSubtype<Byte>(this@xx) }
return (a@{checkSubtype<Double>(this@a) + checkSubtype<Byte>(this@xx)})
}
}
}