[IR] Support user-defined equals for MFVC

Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
This commit is contained in:
Evgeniy.Zhelenskiy
2022-10-14 07:17:03 +02:00
committed by Space Team
parent 51f9f31a0a
commit 9f01ccc304
75 changed files with 1686 additions and 315 deletions
@@ -18116,6 +18116,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/inlineClasses/typedEqualsOperatorDeclarationCheck.kt");
}
@Test
@TestMetadata("typedEqualsOperatorModifierInInlineClass.kt")
public void testTypedEqualsOperatorModifierInInlineClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/inlineClasses/typedEqualsOperatorModifierInInlineClass.kt");
}
@Test
@TestMetadata("unsignedLiteralsWithoutArtifactOnClasspath.kt")
public void testUnsignedLiteralsWithoutArtifactOnClasspath() throws Exception {
@@ -33744,6 +33750,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/valueClasses/identityComparisonWithValueClasses.kt");
}
@Test
@TestMetadata("inefficientEqualsOverridingInMfvc.kt")
public void testInefficientEqualsOverridingInMfvc() throws Exception {
runTest("compiler/testData/diagnostics/tests/valueClasses/inefficientEqualsOverridingInMfvc.kt");
}
@Test
@TestMetadata("jvmInlineApplicability.kt")
public void testJvmInlineApplicability() throws Exception {
@@ -33787,9 +33799,15 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
}
@Test
@TestMetadata("reservedMembersAndConstructsInsideValueClass.kt")
public void testReservedMembersAndConstructsInsideValueClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideValueClass.kt");
@TestMetadata("reservedMembersAndConstructsInsideMfvc.kt")
public void testReservedMembersAndConstructsInsideMfvc() throws Exception {
runTest("compiler/testData/diagnostics/tests/valueClasses/reservedMembersAndConstructsInsideMfvc.kt");
}
@Test
@TestMetadata("typedEqualsOperatorModifierInMfvc.kt")
public void testTypedEqualsOperatorModifierInMfvc() throws Exception {
runTest("compiler/testData/diagnostics/tests/valueClasses/typedEqualsOperatorModifierInMfvc.kt");
}
@Test
@@ -21486,15 +21486,15 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
}
@Test
@TestMetadata("inlineClassEqualsOverride.kt")
public void testInlineClassEqualsOverride() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverride.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
@TestMetadata("inlineClassEqualsOverriddenForCollections.kt")
public void testInlineClassEqualsOverriddenForCollections() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverriddenForCollections.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("inlineClassEqualsOverridenForCollections.kt")
public void testInlineClassEqualsOverridenForCollections() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverridenForCollections.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
@TestMetadata("inlineClassEqualsOverride.kt")
public void testInlineClassEqualsOverride() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverride.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@@ -50465,12 +50465,54 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/valueClasses/functionReferences.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("mfvcBothEqualsOverride.kt")
public void testMfvcBothEqualsOverride() throws Exception {
runTest("compiler/testData/codegen/box/valueClasses/mfvcBothEqualsOverride.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("mfvcEqualsConsistency.kt")
public void testMfvcEqualsConsistency() throws Exception {
runTest("compiler/testData/codegen/box/valueClasses/mfvcEqualsConsistency.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("mfvcEqualsOverriddenForCollections.kt")
public void testMfvcEqualsOverriddenForCollections() throws Exception {
runTest("compiler/testData/codegen/box/valueClasses/mfvcEqualsOverriddenForCollections.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("mfvcEqualsOverride.kt")
public void testMfvcEqualsOverride() throws Exception {
runTest("compiler/testData/codegen/box/valueClasses/mfvcEqualsOverride.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("mfvcFieldInitializationOrder.kt")
public void testMfvcFieldInitializationOrder() throws Exception {
runTest("compiler/testData/codegen/box/valueClasses/mfvcFieldInitializationOrder.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("mfvcHashCodeOverride.kt")
public void testMfvcHashCodeOverride() throws Exception {
runTest("compiler/testData/codegen/box/valueClasses/mfvcHashCodeOverride.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("mfvcTypedEqualsGenerics.kt")
public void testMfvcTypedEqualsGenerics() throws Exception {
runTest("compiler/testData/codegen/box/valueClasses/mfvcTypedEqualsGenerics.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("mfvcUntypedEqualsOverriden.kt")
public void testMfvcUntypedEqualsOverriden() throws Exception {
runTest("compiler/testData/codegen/box/valueClasses/mfvcUntypedEqualsOverriden.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("overrides.kt")
public void testOverrides() throws Exception {