[Wasm] Fix unsigned types in IR interpreter
Wasm kotlin.Any class has properties, additional filtering is required when searching for value class property
This commit is contained in:
+3
-1
@@ -91,7 +91,9 @@ internal class DefaultCallInterceptor(override val interpreter: IrInterpreter) :
|
||||
irClass.defaultType.isUnsignedType() -> {
|
||||
// Check for type is a hack needed for Native;
|
||||
// in UInt, for example, we may have (after lowerings, I guess) additional property "$companion".
|
||||
val propertySymbol = irClass.declarations.single { it is IrProperty && it.getter?.returnType?.isPrimitiveType() == true }.symbol
|
||||
// Check for fake overrides is a hack needed for Wasm;
|
||||
// in UInt, for example, we may have additional typeInfo and hashCode properties declared in "Any"
|
||||
val propertySymbol = irClass.declarations.single { it is IrProperty && !it.isFakeOverride && it.getter?.returnType?.isPrimitiveType() == true }.symbol
|
||||
callStack.pushState(receiver.apply { this.setField(propertySymbol, args.single()) })
|
||||
}
|
||||
else -> defaultAction()
|
||||
|
||||
Reference in New Issue
Block a user