KotlinCompilation.Result#classLoader does not have the sources included in the KotlinCompilation
natanfudge opened this issue · 1 comments
natanfudge commented
Simply running this line in the README.md:
val kClazz = result.classLoader.loadClass("KClass")
Will fail with a java.lang.ClassNotFoundException: KClass.
Either fix the readme to include a working sample, or make the loadClass call work.
versions:
kotlin-compile-testing: 1.4.2
kotlin: 1.5.21
jdk: 16.0.1
tschuchortdev commented
Can you provide the code to reproduce your issue? There are many tests that use the loadClass method and they all pass. Most likely your class is not loadable because the compilation failed... either because the package is wrong or because of the missing } in the Java code example.