JVM_IR: Fix check for whether classes are from Java.
This allows us to not generate redundant immutable collection stubs. The code to generate the immutable collection stubs does not deal well with thinking that all external declarations come from Java.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
@@ -14,9 +14,12 @@ var v: Int = 1
|
||||
|
||||
fun consumeInt(x: Int) {}
|
||||
|
||||
class A {
|
||||
open class A {
|
||||
val OK: String = "OK"
|
||||
@JvmName("OK") get
|
||||
|
||||
@JvmName("g")
|
||||
fun <T> f(x: T, y: Int = 1) = x
|
||||
}
|
||||
|
||||
annotation class Anno(@get:JvmName("uglyJvmName") val value: String)
|
||||
@@ -25,6 +28,8 @@ annotation class Anno(@get:JvmName("uglyJvmName") val value: String)
|
||||
|
||||
import lib.*
|
||||
|
||||
class B : A()
|
||||
|
||||
@Anno("OK")
|
||||
fun annotated() {}
|
||||
|
||||
@@ -36,5 +41,8 @@ fun box(): String {
|
||||
val annoValue = (::annotated.annotations.single() as Anno).value
|
||||
if (annoValue != "OK") return "Fail annotation value: $annoValue"
|
||||
|
||||
val b = B()
|
||||
if (b.f("OK") != "OK") return "Fail call of annotated method"
|
||||
|
||||
return A().OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user