From 68313172c2af5910a80e83477f912f194549896c Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 5 May 2014 21:53:34 +0400 Subject: [PATCH] Don't use KFunctionN types in smart completion FunctionN should be enough --- .../org/jetbrains/jet/plugin/completion/smart/Utils.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/idea/src/org/jetbrains/jet/plugin/completion/smart/Utils.kt b/idea/src/org/jetbrains/jet/plugin/completion/smart/Utils.kt index d466d94ff6c..cce7166c8d1 100644 --- a/idea/src/org/jetbrains/jet/plugin/completion/smart/Utils.kt +++ b/idea/src/org/jetbrains/jet/plugin/completion/smart/Utils.kt @@ -145,11 +145,10 @@ fun MutableCollection.addLookupElementsForNullable(factory: () -> } fun functionType(function: FunctionDescriptor): JetType? { - return KotlinBuiltIns.getInstance().getKFunctionType(function.getAnnotations(), - null, - function.getValueParameters().map { it.getType() }, - function.getReturnType() ?: return null, - function.getReceiverParameter() != null) + return KotlinBuiltIns.getInstance().getFunctionType(function.getAnnotations(), + null, + function.getValueParameters().map { it.getType() }, + function.getReturnType() ?: return null) } fun JetType.isSubtypeOf(expectedType: JetType) = !isError() && JetTypeChecker.INSTANCE.isSubtypeOf(this, expectedType)