Get rid of a couple of usages of simpleTypeWithNonTrivialMemberScope
The simple versions of KotlinTypeFactory::simpleType may lead to smaller number of KotlinType instances (defaultType from descriptor are used if there are no arguments)
This commit is contained in:
@@ -81,7 +81,7 @@ fun replaceReturnTypeForCallable(type: KotlinType, given: KotlinType): KotlinTyp
|
||||
fun replaceReturnTypeByUnknown(type: KotlinType) = replaceReturnTypeForCallable(type, DONT_CARE)
|
||||
|
||||
private fun replaceTypeArguments(type: KotlinType, newArguments: List<TypeProjection>) =
|
||||
KotlinTypeFactory.simpleTypeWithNonTrivialMemberScope(type.annotations, type.constructor, newArguments, type.isMarkedNullable, type.memberScope)
|
||||
KotlinTypeFactory.simpleType(type.annotations, type.constructor, newArguments, type.isMarkedNullable)
|
||||
|
||||
private fun getParameterArgumentsOfCallableType(type: KotlinType) =
|
||||
type.arguments.dropLast(1)
|
||||
|
||||
Reference in New Issue
Block a user