Fix NPE in KCallable.isAccessible for interfaces loaded by boot class loader

Class.getClassLoader returns null for classes loaded by the system class
loader (the one used to start the application). In this case we need to
use ClassLoader.getSystemClassLoader. We already have an extension
`safeClassLoader` specifically for this purpose in reflection.jvm, but
forgot to use it in d59f2bcc80.

 #KT-37707 Fixed
This commit is contained in:
Alexander Udalov
2020-04-08 20:20:50 +02:00
parent a7b959b88b
commit 683489687e
6 changed files with 41 additions and 1 deletions
@@ -25524,6 +25524,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt");
}
@TestMetadata("isAccessibleOnAllMembers.kt")
public void testIsAccessibleOnAllMembers() throws Exception {
runTest("compiler/testData/codegen/box/reflection/functions/isAccessibleOnAllMembers.kt");
}
@TestMetadata("javaClassGetFunctions.kt")
public void testJavaClassGetFunctions() throws Exception {
runTest("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt");