Use mapping mode for inline class underlying type without wrapping
This commit is contained in:
@@ -107,7 +107,9 @@ class TypeMappingMode private constructor(
|
||||
if (type.isInlineClassType() && shouldUseUnderlyingType(type)) {
|
||||
val underlyingType = computeUnderlyingType(type)
|
||||
if (underlyingType != null) {
|
||||
return getOptimalModeForSignaturePart(underlyingType, isForAnnotationParameter, canBeUsedInSupertypePosition)
|
||||
return getOptimalModeForSignaturePart(
|
||||
underlyingType, isForAnnotationParameter, canBeUsedInSupertypePosition
|
||||
).dontWrapInlineClassesMode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,4 +163,10 @@ class TypeMappingMode private constructor(
|
||||
needPrimitiveBoxing, true, isForAnnotationParameter, skipDeclarationSiteWildcards, skipDeclarationSiteWildcardsIfPossible,
|
||||
genericArgumentMode, kotlinCollectionsToJavaCollections, genericContravariantArgumentMode, genericInvariantArgumentMode
|
||||
)
|
||||
|
||||
fun dontWrapInlineClassesMode(): TypeMappingMode =
|
||||
TypeMappingMode(
|
||||
needPrimitiveBoxing, false, isForAnnotationParameter, skipDeclarationSiteWildcards, skipDeclarationSiteWildcardsIfPossible,
|
||||
genericArgumentMode, kotlinCollectionsToJavaCollections, genericContravariantArgumentMode, genericInvariantArgumentMode
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user