Implement property for explicit jvmTarget for script definition...
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
This commit is contained in:
committed by
TeamCityServer
parent
f0316cde54
commit
1450f4d890
@@ -0,0 +1,9 @@
|
||||
|
||||
import javax.script.*
|
||||
|
||||
inline fun<T> foo(body: () -> T): T = body()
|
||||
|
||||
fun main() {
|
||||
val scriptEngine = ScriptEngineManager().getEngineByExtension("kts")!!
|
||||
scriptEngine.eval("println(foo { \"OK\" })")
|
||||
}
|
||||
Reference in New Issue
Block a user