Rename KotlinBuiltIns.getFunctionType -> createFunctionType, move to functionTypes.kt

This commit is contained in:
Alexander Udalov
2016-03-14 13:40:38 +03:00
parent fd344561fc
commit 2ce661af98
13 changed files with 98 additions and 100 deletions
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.load.java.sam;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.builtins.FunctionTypesKt;
import org.jetbrains.kotlin.descriptors.*;
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
import org.jetbrains.kotlin.descriptors.impl.TypeParameterDescriptorImpl;
@@ -31,7 +32,7 @@ import org.jetbrains.kotlin.resolve.jvm.JavaResolverUtils;
import org.jetbrains.kotlin.types.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -89,7 +90,9 @@ public class SingleAbstractMethodUtils {
for (ValueParameterDescriptor parameter : valueParameters) {
parameterTypes.add(parameter.getType());
}
return DescriptorUtilsKt.getBuiltIns(function).getFunctionType(Annotations.Companion.getEMPTY(), null, parameterTypes, returnType);
return FunctionTypesKt.createFunctionType(
DescriptorUtilsKt.getBuiltIns(function), Annotations.Companion.getEMPTY(), null, parameterTypes, returnType
);
}
@Nullable
@@ -142,7 +145,7 @@ public class SingleAbstractMethodUtils {
null,
null,
typeParameters.descriptors,
Arrays.asList(parameter),
Collections.singletonList(parameter),
returnType,
Modality.FINAL,
samInterface.getVisibility()