Don't use KFunctionN types in smart completion
FunctionN should be enough
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user