Don't use KFunctionN types in smart completion

FunctionN should be enough
This commit is contained in:
Alexander Udalov
2014-05-05 21:53:34 +04:00
parent c2594d7695
commit 68313172c2
@@ -145,11 +145,10 @@ fun MutableCollection<LookupElement>.addLookupElementsForNullable(factory: () ->
} }
fun functionType(function: FunctionDescriptor): JetType? { fun functionType(function: FunctionDescriptor): JetType? {
return KotlinBuiltIns.getInstance().getKFunctionType(function.getAnnotations(), return KotlinBuiltIns.getInstance().getFunctionType(function.getAnnotations(),
null, null,
function.getValueParameters().map { it.getType() }, function.getValueParameters().map { it.getType() },
function.getReturnType() ?: return null, function.getReturnType() ?: return null)
function.getReceiverParameter() != null)
} }
fun JetType.isSubtypeOf(expectedType: JetType) = !isError() && JetTypeChecker.INSTANCE.isSubtypeOf(this, expectedType) fun JetType.isSubtypeOf(expectedType: JetType) = !isError() && JetTypeChecker.INSTANCE.isSubtypeOf(this, expectedType)