[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:
committed by
Space Team
parent
363b336b7a
commit
883102c4c6
+17
@@ -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
|
||||
}
|
||||
+17
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user