[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
@@ -340,9 +340,9 @@ fun FirTypeRef.approximated(
|
||||
return withReplacedConeType(alternativeType)
|
||||
}
|
||||
val approximatedType = if (toSuper)
|
||||
typeApproximator.approximateToSuperType(alternativeType, TypeApproximatorConfiguration.PublicDeclaration)
|
||||
typeApproximator.approximateToSuperType(alternativeType, TypeApproximatorConfiguration.PublicDeclaration.SaveAnonymousTypes)
|
||||
else
|
||||
typeApproximator.approximateToSubType(alternativeType, TypeApproximatorConfiguration.PublicDeclaration)
|
||||
typeApproximator.approximateToSubType(alternativeType, TypeApproximatorConfiguration.PublicDeclaration.SaveAnonymousTypes)
|
||||
return withReplacedConeType(approximatedType)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user