Copied from #intellij -->
I've tried every trick I have found documented and many I have not to get Intellij kotlin "script" to interop properly with Java 1.8. Whether in REPL or in a scratch if its a '.kts' the exact same code that works for .kt files fails with .kts files when I use an inline function that was compiled using jvm 1.8 (as ALL my settings and projects specify).
The complaint is the well known "cant use inline bytecode from 1.8 when compiling into 1.6 bytecode pleas use -jvm-target" -- but from inside intellij you cant specify it (I tried -- ,as well as all the settings, facets, hand-editing the .iml files etc no go.
Take the exact same .kts file and rename it to ".kt" works fine.
Looking in the kotin compiler source doesnt seem to be another global way to fix this -- its got to be passed down through intellij somewhere -- I've put ever variant I can find in my gradle scripts to no affect.
My conclusion is that kotlin script compilation doesnt follow the same paths as kotlin compiling.
Any suggestions ?