Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make different type aliases compaitble in diff, intersect and merge #111

Closed
wants to merge 1 commit into from

Conversation

error17191
Copy link
Contributor

@error17191 error17191 commented Dec 5, 2022

Description

Make it works when calling diff, intersect or merge on two collections having the same type but with different aliases like int and integer

This applies on:
int, integer
bool, boolean
float, double

Motivation and context

Code like this should work without having to construct both collections as int or integer

(new Collection('integer', [1, 2, 3]))->diff(new Collection('int', [1, 2]));

How has this been tested?

I added a method to test it in CollectionManipulationTest

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.

@ramsey ramsey self-requested a review as a code owner December 27, 2022 07:59
@ramsey
Copy link
Owner

ramsey commented Dec 27, 2022

Thank you for contributing! 🎉

I committed this in 77a182e.

@ramsey ramsey closed this Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants