Files
Ilya Chernikov 1c0870c6d2 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.

GitOrigin-RevId: 0a444a225a5f4d5a4d9082a5fd490361167936cd
2020-02-14 13:41:30 +03:00

31 lines
1.2 KiB
Kotlin

package m2
public fun testUseAsReceiver(api: javaInterface.API) {
api.useM1A<String> {
<error descr="[NO_THIS] 'this' is not defined in this context">this</error>.<error descr="[DEBUG] Reference is not resolved to anything, but is not marked unresolved">length</error>
}
api.useM1B<String> {
this.length
}
api.useM2A<String> {
<error descr="[NO_THIS] 'this' is not defined in this context">this</error>.<error descr="[DEBUG] Reference is not resolved to anything, but is not marked unresolved">length</error>
}
api.useM2B<String> {
this.length
}
}
public fun testUseAsParameter(api: javaInterface.API) {
api.useM1A<String> {
it.length
}
api.useM1B<String> {
<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: it">it</error>.<error descr="[DEBUG] Reference is not resolved to anything, but is not marked unresolved">length</error>
}
api.useM2A<String> {
it.length
}
api.useM2B<String> {
<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: it">it</error>.<error descr="[DEBUG] Reference is not resolved to anything, but is not marked unresolved">length</error>
}
}