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

Obsolete Matches extension methods in TheSadRogue.Primitives Package #114

Open
Chris3606 opened this issue Feb 11, 2023 · 1 comment
Open

Comments

@Chris3606
Copy link
Contributor

The function is uncallable by typical means since it operates on a self type of Rectangle and also a second type of Rectangle. This means that the typical call syntax of r1.Matches(r2) actually calls Rectangle's IMatchable implementation, and therefore unless you are calling extension methods via static method syntax, there is no way to call this extension method.

There is also no difference in functionality between this and the IMatchable implementation. Ideally we would remove it, but to preserve backwards compatibility we can just deprecate it.

@Chris3606 Chris3606 changed the title Obsolete RectangleExtensions.Matches in TheSadRogue.Primitives Package Obsolete Matches extension methods in TheSadRogue.Primitives Package Feb 11, 2023
@Chris3606
Copy link
Contributor Author

The same goes for ColorExtensions.Matches as well, it appears.

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

No branches or pull requests

1 participant