blob: 31af6d3a9b365bd5e99d2f5f3a4c4fccba13af85 [file]
// RUN_PIPELINE_TILL: FRONTEND
// DIAGNOSTICS: -UNUSED_PARAMETER
interface JPAEntityClass<D> {
fun <T> T.findByName(s: String): D {null!!}
}
class Foo {
companion object : JPAEntityClass<Foo>
}
fun main() {
<!CANNOT_INFER_PARAMETER_TYPE!>with<!>("", {
Foo.<!UNRESOLVED_REFERENCE!>findByName<!>("")
})
with(Foo) {
findByName("")
}
}
/* GENERATED_FIR_TAGS: checkNotNullCall, classDeclaration, companionObject, funWithExtensionReceiver,
functionDeclaration, interfaceDeclaration, lambdaLiteral, nullableType, objectDeclaration, stringLiteral, typeParameter */