boolean (@NotNull KtNamedDeclaration a, @NotNull KtNamedDeclaration b) { KtTypeReference aReceiver = getReceiverType(a); KtTypeReference bReceiver = getReceiverType(b); if ((aReceiver == null) != (bReceiver == null)) { return false; } if (aReceiver != null && !typesHaveSameShortName(aReceiver, bReceiver)) { return false; } List<KtParameter> aParameters = getValueParameters(a); List<KtParameter> bParameters = getValueParameters(b); if (aParameters.size() != bParameters.size()) { return false; } for (int i = 0; i < aParameters.size(); i++) { KtTypeReference aType = aParameters.get(i).getTypeReference(); KtTypeReference bType = bParameters.get(i).getTypeReference(); assert aType != null; assert bType != null; if (!typesHaveSameShortName(aType, bType)) { return false; } } return true; }