[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:
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user