[Test] Reproduce KT-59715
This commit is contained in:
committed by
Space Team
parent
63e7749cfe
commit
92c75fb7ab
+6
@@ -27278,6 +27278,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("destructuringDeclarationWithInvoke.kt")
|
||||||
|
public void testDestructuringDeclarationWithInvoke() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
||||||
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
||||||
|
|||||||
+6
@@ -27278,6 +27278,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("destructuringDeclarationWithInvoke.kt")
|
||||||
|
public void testDestructuringDeclarationWithInvoke() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
||||||
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
||||||
|
|||||||
+6
@@ -25194,6 +25194,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("destructuringDeclarationWithInvoke.kt")
|
||||||
|
public void testDestructuringDeclarationWithInvoke() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
||||||
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
||||||
|
|||||||
+6
@@ -25200,6 +25200,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("destructuringDeclarationWithInvoke.kt")
|
||||||
|
public void testDestructuringDeclarationWithInvoke() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
||||||
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
||||||
|
|||||||
Vendored
+23
@@ -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 (x) = FunctionComponent()
|
||||||
|
val (y) = c
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test_2(c: InvokeComponent) {
|
||||||
|
val (x) = FunctionComponent()
|
||||||
|
val (y) = c
|
||||||
|
}
|
||||||
Vendored
+23
@@ -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
|
||||||
|
}
|
||||||
Generated
+6
@@ -27278,6 +27278,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("destructuringDeclarationWithInvoke.kt")
|
||||||
|
public void testDestructuringDeclarationWithInvoke() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/operatorsOverloading/destructuringDeclarationWithInvoke.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
@TestMetadata("EqualsOperatorOverrideHierarchies.kt")
|
||||||
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
public void testEqualsOperatorOverrideHierarchies() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user