[Test] Reproduce KT-59715

This commit is contained in:
Dmitriy Novozhilov
2023-12-11 12:41:27 +02:00
committed by Space Team
parent 63e7749cfe
commit 92c75fb7ab
7 changed files with 76 additions and 0 deletions
@@ -0,0 +1,23 @@
// ISSUE: KT-59715
class FunctionComponent {
val component1: () -> String = { "hello" }
}
class I {
operator fun invoke(): String = "hello"
}
class InvokeComponent {
val component1: I = I()
}
fun test_1(c: FunctionComponent) {
val (<!PROPERTY_AS_OPERATOR!>x<!>) = FunctionComponent()
val (<!PROPERTY_AS_OPERATOR!>y<!>) = c
}
fun test_2(c: InvokeComponent) {
val (<!PROPERTY_AS_OPERATOR!>x<!>) = FunctionComponent()
val (<!PROPERTY_AS_OPERATOR!>y<!>) = c
}