Reflection: create synthetic classes for Java lambdas

... as well as $SwitchMap and other synthetic classes generated by javac
or other JVM language compilers or runtimes.

Note that for Kotlin, all synthetic classes were already handled by the
subsequent check for `KotlinClassHeader.Kind.SYNTHETIC_CLASS`, but after
this change we won't call `ReflectKotlinClass.create` for those, which
is a minor optimization.

 #KT-41373 Fixed
This commit is contained in:
Alexander Udalov
2023-03-28 20:45:48 +02:00
committed by Space Team
parent 5dc882abf5
commit f5bbf2b4fe
2 changed files with 10 additions and 3 deletions
@@ -90,9 +90,7 @@ fun box(): String {
checkMultifileClass()
checkMultifileClassPart()
checkKotlinLambda()
// TODO: fails with KotlinReflectionInternalError: Unresolved class: class JavaClass$$Lambda$1166/180251002 (kind = null)
// checkJavaLambda()
checkJavaLambda()
return "OK"
}