[FE] Add ability to configure PublicDeclaration type approximation configuration
This configuration allows to choose what to do with local and anonymous types
This commit is contained in:
committed by
Space Team
parent
82c39187f6
commit
32f6b71525
+2
-2
@@ -702,9 +702,9 @@ class FirElementSerializer private constructor(
|
||||
}
|
||||
is ConeIntersectionType -> {
|
||||
val approximatedType = if (toSuper) {
|
||||
typeApproximator.approximateToSuperType(type, TypeApproximatorConfiguration.PublicDeclaration)
|
||||
typeApproximator.approximateToSuperType(type, TypeApproximatorConfiguration.PublicDeclaration.SaveAnonymousTypes)
|
||||
} else {
|
||||
typeApproximator.approximateToSubType(type, TypeApproximatorConfiguration.PublicDeclaration)
|
||||
typeApproximator.approximateToSubType(type, TypeApproximatorConfiguration.PublicDeclaration.SaveAnonymousTypes)
|
||||
}
|
||||
assert(approximatedType != type && approximatedType is ConeKotlinType) {
|
||||
"Approximation failed: ${type.renderForDebugging()}"
|
||||
|
||||
Reference in New Issue
Block a user