Set correct base classloader for REPL evaluation

the contributed partial fix of KT-35925 set it to the system classloader
which brought in many cases the compiler CP into the evaluation and lead
to the problems like KT-40898. This fix set it to the extension/platform
classloader, which preserves (partial) fix of the KT-35925 and do not
bring the compiler jar into the REPL evaluation classpath.

#KT-40898 fixed
This commit is contained in:
Ilya Chernikov
2020-08-18 11:56:01 +02:00
parent f713e8ad36
commit 0a9089bc72
@@ -42,7 +42,7 @@ class ReplInterpreter(
ReplClassLoader(
URLClassLoader(
classpathRoots.map { it.toURI().toURL() }.toTypedArray(),
ClassLoader.getSystemClassLoader()
ClassLoader.getSystemClassLoader()?.parent
)
)