Allow expect/actual annotation constructors to have default values
When a parameter has a default argument value both in the expected annotation and in the actual annotation, they must be equal. This check has been only implemented for the case when actual annotation is Kotlin source code, and NOT a Java class coming from an actual typealias. The latter case would require a bit more work in passing a platform-specific annotation-value-reading component to ExpectedActualDeclarationChecker, and is therefore postponed. For now, Java annotations that are visible through actual type aliases cannot have default argument values for parameters which already have default values in the expected annotation declaration #KT-22703 Fixed #KT-22704 Open
This commit is contained in:
+6
@@ -12662,6 +12662,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotations.kt")
|
||||
public void testAnnotations() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/annotations.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("constructor.kt")
|
||||
public void testConstructor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt");
|
||||
|
||||
Reference in New Issue
Block a user