[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:
Roman Efremov
2023-10-17 14:16:11 +02:00
committed by Space Team
parent 7893624589
commit 0f0540cda0
5 changed files with 38 additions and 0 deletions
@@ -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>) {}<!>
@@ -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>) {}