[IR] Specify explicitly that classes from Java can be interpreted

In early prototypes of interpreter, it was easier to assume that
all classes from Java can be interpreted and fix something if not.
Check for Java declaration was done by checking that the package name is
starting with "java". But this is actually wrong and can lead to errors
when some code is declared in "java" something package, but is not from
Java stdlib.

#KT-60467 Fixed
This commit is contained in:
Ivan Kylchik
2023-07-19 12:40:55 +02:00
committed by Space Team
parent 43c66ee0e5
commit 30c00f7983
15 changed files with 160 additions and 7 deletions
@@ -0,0 +1,17 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
package java2d
class A {
fun getConst() = <!EVALUATED("OK")!>OK<!>
companion object {
const val OK = <!EVALUATED("OK")!>"OK"<!>
}
}
fun box(): String {
return A().getConst()
}