From 295f2fd40a4062f8c3b895c185daf593d7db8dbc Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Tue, 9 Aug 2016 16:58:25 +0200 Subject: [PATCH] Fix GeneratedClassloader creation in scripts compilation, fixes test --- .../kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt index 77f632804c4..bff3bead3f2 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt @@ -344,7 +344,7 @@ object KotlinToJVMBytecodeCompiler { val state = analyzeAndGenerate(environment) ?: return null try { - val classLoader = GeneratedClassLoader(state.factory, makeParentClassLoader(), null) + val classLoader = GeneratedClassLoader(state.factory, makeParentClassLoader()) val script = environment.getSourceFiles()[0].script ?: error("Script must be parsed") return classLoader.loadClass(script.fqName.asString())