Use JvmWildcard on return type of getContributedVariables/getContributedFunctions
This commit is contained in:
+3
-2
@@ -1187,8 +1187,9 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
KotlinType refinedType = KotlinBuiltIns.isNothingOrNullableNothing(receiver.getType()) ?
|
||||
components.builtIns.getNullableAnyType() :
|
||||
receiver.getType();
|
||||
Collection<SimpleFunctionDescriptor> equalsMembers = refinedType.getMemberScope().getContributedFunctions(
|
||||
OperatorNameConventions.EQUALS, new KotlinLookupLocation(expression.getOperationReference()));
|
||||
Collection<? extends SimpleFunctionDescriptor> equalsMembers = refinedType.getMemberScope().getContributedFunctions(
|
||||
OperatorNameConventions.EQUALS, new KotlinLookupLocation(expression.getOperationReference())
|
||||
);
|
||||
|
||||
return CollectionsKt.filter(equalsMembers, descriptor -> {
|
||||
if (ErrorUtils.isError(descriptor)) return true;
|
||||
|
||||
@@ -99,8 +99,9 @@ public class DataFlowAnalyzer {
|
||||
}
|
||||
|
||||
private boolean typeHasOverriddenEquals(@NotNull KotlinType type, @NotNull KtElement lookupElement) {
|
||||
Collection<SimpleFunctionDescriptor> members = type.getMemberScope().getContributedFunctions(
|
||||
OperatorNameConventions.EQUALS, new KotlinLookupLocation(lookupElement));
|
||||
Collection<? extends SimpleFunctionDescriptor> members = type.getMemberScope().getContributedFunctions(
|
||||
OperatorNameConventions.EQUALS, new KotlinLookupLocation(lookupElement)
|
||||
);
|
||||
for (FunctionDescriptor member : members) {
|
||||
KotlinType returnType = member.getReturnType();
|
||||
if (returnType == null || !KotlinBuiltIns.isBoolean(returnType)) continue;
|
||||
|
||||
Reference in New Issue
Block a user