Optimizations

This commit is contained in:
Valentin Kipyatkov
2016-09-13 22:22:50 +03:00
parent 6b94e5fd34
commit d8759fcbcc
5 changed files with 23 additions and 17 deletions
@@ -56,8 +56,16 @@ object KotlinTypeFactory {
annotations: Annotations,
descriptor: ClassDescriptor,
arguments: List<TypeProjection>,
parameterNames: List<Name>
): FunctionType = FunctionType(simpleNotNullType(annotations, descriptor, arguments), parameterNames)
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(