K2 Scripting: implement basic metadata serialization support

#KT-62305 fixed
NB: kotlin reflection do not see script class constructor after
this change, and it's ok, since the fact that the script is compiled
into a class is an implementation detail.
If needed, java reflection could be used to access the constructor.
This commit is contained in:
Ilya Chernikov
2023-10-04 13:50:38 +02:00
committed by Space Team
parent 122f16fc18
commit 31f9e9e7a8
17 changed files with 251 additions and 24 deletions
@@ -35,7 +35,7 @@ import kotlin.script.experimental.jvmhost.JvmScriptCompiler
*/
class ImplicitsFromScriptResultTest : TestCase() {
fun testImplicits() = expectTestToFailOnK2 {
fun testImplicits() {
// the implementation of the Compiler Host doesn't work with IR - the inter-script symbol table
// should be maintained to make it run (see latest REPL compiler implementations for details
// TODO: consider either fix it or rewrite to the REPL compiler