[Test] Add test for reporting of function default value parameters
...in `ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` diagnostic message. ^KT-62585
This commit is contained in:
committed by
Space Team
parent
7893624589
commit
0f0540cda0
+6
@@ -848,6 +848,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/compatibleOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultValueParametersRendering.kt")
|
||||
public void testDefaultValueParametersRendering() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/defaultValueParametersRendering.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedAnnotationOnlyOnActual_useInPlatform.kt")
|
||||
public void testDeprecatedAnnotationOnlyOnActual_useInPlatform() throws Exception {
|
||||
|
||||
+6
@@ -848,6 +848,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/compatibleOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultValueParametersRendering.kt")
|
||||
public void testDefaultValueParametersRendering() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/defaultValueParametersRendering.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedAnnotationOnlyOnActual_useInPlatform.kt")
|
||||
public void testDeprecatedAnnotationOnlyOnActual_useInPlatform() throws Exception {
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
annotation class Ann
|
||||
|
||||
@Ann
|
||||
expect fun foo(p: Array<Int> = arrayOf())
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
<!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("fun foo(p: Array<Int> = R|arrayOf|<Int>()): Unit; fun foo(p: Array<Int>): Unit; Annotation `@Ann()` is missing on actual declaration")!>foo<!>(p: Array<Int>) {}<!>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
annotation class Ann
|
||||
|
||||
@Ann
|
||||
expect fun foo(p: Array<Int> = arrayOf())
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT("fun foo(p: Array<Int> = ...): Unit defined in root package in file common.kt; fun foo(p: Array<Int>): Unit defined in root package in file jvm.kt; Annotation `@Ann` is missing on actual declaration")!>foo<!>(p: Array<Int>) {}
|
||||
Generated
+6
@@ -24077,6 +24077,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/compatibleOverrides.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultValueParametersRendering.kt")
|
||||
public void testDefaultValueParametersRendering() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/defaultValueParametersRendering.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecatedAnnotationOnlyOnActual_useInPlatform.kt")
|
||||
public void testDeprecatedAnnotationOnlyOnActual_useInPlatform() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user