Reflection: support Java anonymous/local classes

Local classes and anonymous objects are normal classes and
kotlin-reflect can load all declarations and modifiers from them, and
support calling members, exactly in the same way as it does for normal
non-local classes.

 #KT-41373 In Progress
This commit is contained in:
Alexander Udalov
2023-03-28 01:11:49 +02:00
committed by Space Team
parent 1e031d9fb8
commit d833b732c9
3 changed files with 17 additions and 6 deletions
@@ -116,9 +116,8 @@ fun box(): String {
checkKotlinAnonymousObject()
checkKotlinLocalClass()
// TODO: fails with KotlinReflectionInternalError: Unresolved class: class JavaClass$1 (kind = null)
// checkJavaAnonymousObject()
// checkJavaLocalClass()
checkJavaAnonymousObject()
checkJavaLocalClass()
return "OK"
}