[JS FIR] Fix the JsExport diagnostic for nullable primitive types
- Correctly handle nullable primitive types. - Unsigned primitive arrays are not exportable. ^KT-64366 Fixed
This commit is contained in:
committed by
Space Team
parent
c4fc0b919d
commit
89e2af2047
+3
-2
@@ -203,7 +203,7 @@ object FirJsExportDeclarationChecker : FirBasicDeclarationChecker() {
|
||||
|
||||
val nonNullable = withNullability(ConeNullability.NOT_NULL, session.typeContext)
|
||||
val isPrimitiveExportableType = nonNullable.isAny || nonNullable.isNullableAny
|
||||
|| nonNullable is ConeDynamicType || isPrimitiveExportableConeKotlinType
|
||||
|| nonNullable is ConeDynamicType || nonNullable.isPrimitiveExportableConeKotlinType
|
||||
val symbol = toSymbol(session)
|
||||
|
||||
return when {
|
||||
@@ -222,7 +222,8 @@ object FirJsExportDeclarationChecker : FirBasicDeclarationChecker() {
|
||||
|| isString
|
||||
|| isPrimitiveNumberOrNullableType && !isLong
|
||||
|| isNothingOrNullableNothing
|
||||
|| isArrayType
|
||||
|| isPrimitiveArray
|
||||
|| isNonPrimitiveArray
|
||||
|
||||
private fun validateDeclarationOnConsumableName(
|
||||
declaration: FirMemberDeclaration,
|
||||
|
||||
Reference in New Issue
Block a user