[K/Wasm] Allow to export unsigned numbers

This commit is contained in:
Artem Kobzar
2023-12-08 09:06:19 +00:00
committed by Space Team
parent a3c1f4ea12
commit 2eb1e65bbf
19 changed files with 528 additions and 24 deletions
@@ -72,5 +72,5 @@ private fun isTypeSupportedInWasmInterop(
}
// Primitive numbers and Boolean are supported
return type.isPrimitive && !type.isChar
return (type.isPrimitive && !type.isChar) || type.isUnsignedType
}
@@ -122,7 +122,7 @@ private fun isTypeSupportedInJsInterop(
val nonNullable = type.withNullability(ConeNullability.NOT_NULL, session.typeContext)
if (nonNullable.isPrimitive || nonNullable.isString) {
if (nonNullable.isPrimitive || nonNullable.isUnsignedType || nonNullable.isString) {
return true
}