30c00f7983
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
20 lines
572 B
Kotlin
Vendored
20 lines
572 B
Kotlin
Vendored
// Can't be tested in JVM because frontend doesn't allow such code
|
|
// TARGET_BACKEND: JS_IR
|
|
// TARGET_BACKEND: NATIVE
|
|
// WITH_STDLIB
|
|
|
|
package java.lang
|
|
|
|
object Math {
|
|
const val E: Double = kotlin.math.<!EVALUATED("2.718281828459045")!>E<!>
|
|
const val PI: Double = kotlin.math.<!EVALUATED("3.141592653589793")!>PI<!>
|
|
const val OK: String = <!EVALUATED("OK")!>"OK"<!>
|
|
}
|
|
|
|
const val usageE = Math.<!EVALUATED("2.718281828459045")!>E<!>
|
|
const val usagePI = Math.<!EVALUATED("3.141592653589793")!>PI<!>
|
|
|
|
fun box(): String {
|
|
return Math.<!EVALUATED("OK")!>OK<!>
|
|
}
|