Changes on code review
This commit is contained in:
@@ -311,7 +311,7 @@ internal class DescriptorRendererImpl(
|
||||
append("(")
|
||||
val parameterTypes = getValueParameterTypesFromFunctionType(type)
|
||||
val parameterNames = type.getParameterNamesFromFunctionType() ?: parameterTypes.map { SpecialNames.NO_NAME_PROVIDED }
|
||||
assert(parameterNames.size == parameterTypes.size)
|
||||
assert(parameterNames.size == parameterTypes.size) { "Number of names does not match number of types for $type"}
|
||||
|
||||
for (index in parameterTypes.indices) {
|
||||
val typeProjection = parameterTypes[index]
|
||||
|
||||
@@ -51,22 +51,6 @@ object KotlinTypeFactory {
|
||||
arguments: List<TypeProjection>
|
||||
): SimpleType = SimpleTypeImpl(annotations, descriptor.typeConstructor, arguments, false, descriptor.getMemberScope(arguments))
|
||||
|
||||
@JvmStatic
|
||||
fun functionType(
|
||||
annotations: Annotations,
|
||||
descriptor: ClassDescriptor,
|
||||
arguments: List<TypeProjection>,
|
||||
parameterNames: List<Name>?
|
||||
): SimpleType {
|
||||
val simpleType = simpleNotNullType(annotations, descriptor, arguments)
|
||||
if (parameterNames == null || parameterNames.all { it.isSpecial }) {
|
||||
return simpleType
|
||||
}
|
||||
else {
|
||||
return FunctionType(simpleType, parameterNames)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun simpleType(
|
||||
baseType: SimpleType,
|
||||
|
||||
Reference in New Issue
Block a user