[IR] Support ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE in K2
It's implemented as IR checker because in K2 constant expressions are evaluated on backend. FIR diagnostic removed because isn't needed. "annotationViaActualTypeAlias" test has no `// FIR_IDENTICAL` because diagnostic reported on entire typealias declaration instead of its name. This is because in IR+LightTree we have only offsets, so can't navigate to typealias name element. ^KT-59940 Fixed
This commit is contained in:
committed by
Space Team
parent
ce666182a2
commit
ad4d1a5ba8
-32
@@ -1,32 +0,0 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
expect annotation class A1(val x: Int, val y: String = "OK")
|
||||
|
||||
expect annotation class A2(val x: Int = 42, val y: String = "OK")
|
||||
|
||||
expect annotation class A3(val x: Int, val y: String)
|
||||
|
||||
expect annotation class A4(val x: Int = 42, val y: String)
|
||||
|
||||
expect annotation class A5(val x: Int = 42, val y: String)
|
||||
|
||||
@A1(0)
|
||||
@A2
|
||||
@A3(0, "")
|
||||
@A4(0, "")
|
||||
@A5(0, "")
|
||||
fun test() {}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
actual annotation class A1(actual val x: Int, actual val y: String)
|
||||
|
||||
actual annotation class A2(actual val x: Int, actual val y: String = "OK")
|
||||
|
||||
actual annotation class A3(actual val x: Int = 42, actual val y: String = "OK")
|
||||
|
||||
actual annotation class A4(actual val x: Int, actual val y: String = "OK")
|
||||
|
||||
actual annotation class A5(actual val x: Int = 239, actual val y: String = "OK")
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ actual typealias A1 = J1
|
||||
actual typealias A2 = J2
|
||||
actual typealias A3 = J3
|
||||
actual typealias A4 = J4
|
||||
actual typealias A5 = J5
|
||||
<!ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE!>actual typealias A5 = J5<!>
|
||||
|
||||
// FILE: J1.java
|
||||
|
||||
|
||||
Reference in New Issue
Block a user