Simplify data class function generation and signature lookup code
- change prerequisites for generating equals/hashCode/toString in a data class: previously they were generated if the corresponding method is trivial (i.e. it comes from kotlin.Any), now we're generating it always unless it'll cause a JVM signature clash error (see KT-6206) - use static KotlinBuiltIns.isXxx methods to compare types instead of checking against descriptors loaded from certain built-ins instance, this is quicker and more correct in environments where several built-ins are possible - don't use isOrOverridesSynthesized, it's not relevant for equals/hashCode/toString because functions with these names are never synthesized #KT-6206 Fixed
This commit is contained in:
@@ -4123,6 +4123,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nonTrivialFinalMemberInSuperClass.kt")
|
||||
public void testNonTrivialFinalMemberInSuperClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialFinalMemberInSuperClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nonTrivialMemberInSuperClass.kt")
|
||||
public void testNonTrivialMemberInSuperClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialMemberInSuperClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("privateValParams.kt")
|
||||
public void testPrivateValParams() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/privateValParams.kt");
|
||||
|
||||
Reference in New Issue
Block a user