[FIR] Always run expect actual matching for actual annotation/inline class primary constructor

Previously, we didn't run it when the primary constructor itself didn't
have the actual modifier even though the modifier is optional.

#KT-60120 Fixed
This commit is contained in:
Kirill Rakhman
2023-07-05 14:24:51 +02:00
committed by Space Team
parent 363b336b7a
commit 883102c4c6
6 changed files with 66 additions and 3 deletions
@@ -0,0 +1,17 @@
// WITH_STDLIB
// MODULE: m1-common
// FILE: common.kt
expect annotation class Measurement(val iterations: Int = -1)
expect value class Inline(val value: String = "")
// MODULE: m2-jvm()()(m1-common)
// FILE: jvm.kt
actual annotation class Measurement(actual val iterations: Int)
@JvmInline actual value class Inline(val value: String)
@Measurement()
fun test() {
Inline() // KT-60476 Fixed in K2
}
@@ -0,0 +1,17 @@
// WITH_STDLIB
// MODULE: m1-common
// FILE: common.kt
expect annotation class Measurement(val iterations: Int = -1)
expect value class Inline(val value: String = "")
// MODULE: m2-jvm()()(m1-common)
// FILE: jvm.kt
actual annotation class Measurement(actual val iterations: Int)
@JvmInline actual value class Inline(val value: String)
@Measurement()
fun test() {
Inline<!NO_VALUE_FOR_PARAMETER!>()<!> // KT-60476 Fixed in K2
}