Introduce a util to copy TypeMappingMode for UAST

This commit is contained in:
Jinseong Jeon
2022-12-23 17:27:48 -08:00
committed by Ilya Kirillov
parent e89a387cd4
commit b088e742ae
2 changed files with 24 additions and 13 deletions
@@ -142,4 +142,20 @@ class TypeMappingMode @TypeMappingModeInternals constructor(
needPrimitiveBoxing, false, isForAnnotationParameter, skipDeclarationSiteWildcards, skipDeclarationSiteWildcardsIfPossible,
genericArgumentMode, kotlinCollectionsToJavaCollections, genericContravariantArgumentMode, genericInvariantArgumentMode
)
fun mapTypeAliases(
genericArgumentMode: TypeMappingMode? = null
): TypeMappingMode =
TypeMappingMode(
needPrimitiveBoxing,
needInlineClassWrapping,
isForAnnotationParameter,
skipDeclarationSiteWildcards,
skipDeclarationSiteWildcardsIfPossible,
genericArgumentMode ?: this.genericArgumentMode,
kotlinCollectionsToJavaCollections,
genericContravariantArgumentMode,
genericInvariantArgumentMode,
mapTypeAliases = true
)
}