1450f4d890
Apply the property to the default JSR-223 script taking the value from java.specification.version property, so effectively implementing jvmTarget detection from current VM. Also drop enforcing of target 1.8, using common default. #KT-49329 fixed #KT-40497 fixed
10 lines
209 B
Kotlin
Vendored
10 lines
209 B
Kotlin
Vendored
|
|
import javax.script.*
|
|
|
|
inline fun<T> foo(body: () -> T): T = body()
|
|
|
|
fun main() {
|
|
val scriptEngine = ScriptEngineManager().getEngineByExtension("kts")!!
|
|
scriptEngine.eval("println(foo { \"OK\" })")
|
|
}
|