EA-219152 (partially): Support KClass 'unboxing' in debugger
KClass can be 'unboxed' to a plain Java class. Debugger should be aware of this. Unfortunately, this commit is not enough to fully support this scenario, as it's impossible to invoke KClass methods/extension on java.lang.Class instance. There should be an additional diagnostic that will forbid such calls.
This commit is contained in:
+5
@@ -50,6 +50,11 @@ class EvaluatorValueConverter(val context: ExecutionContext) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (requestedType == AsmTypes.K_CLASS_TYPE && actualType == AsmTypes.JAVA_CLASS_TYPE) {
|
||||
// KClass can be represented as a Java class for simpler cases. See BoxingInterpreter.isJavaLangClassBoxing().
|
||||
return true
|
||||
}
|
||||
|
||||
val unwrappedActualType = unwrap(actualType)
|
||||
val unwrappedRequestedType = unwrap(requestedType)
|
||||
return unwrappedActualType == unwrappedRequestedType
|
||||
|
||||
Reference in New Issue
Block a user