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

Support inheritance chain of CLR objects with instanceof operator #1511

Merged
merged 3 commits into from Mar 26, 2023

Conversation

mainlyer
Copy link
Contributor

Hi! I implemented the functionality to make instanceof operator behave following the ineritance chain of CLR objects. But, because this not should be the default behavior, I suggest an explicit activation via Options.Runtime or a class Attribute. I made a test for net 6.0 too.

Regards.

@lahma
Copy link
Collaborator

lahma commented Mar 26, 2023

Thanks for the PR, I did a small tweak and moved the logic to be inside of TypeReference and bound via hasInstance symbol.

@lahma lahma changed the title Inheritance chain of CLR objects for instanceof operator Support inheritance chain of CLR objects with instanceof operator Mar 26, 2023
@lahma lahma enabled auto-merge (squash) March 26, 2023 07:24
@lahma lahma added the interop label Mar 26, 2023
@lahma
Copy link
Collaborator

lahma commented Mar 26, 2023

Hoping to see more PRs and next time I'd suggest creating a separate branch for the PR, will make things usually easier 👍🏻

@lahma lahma merged commit ef89768 into sebastienros:main Mar 26, 2023
3 checks passed
@mainlyer
Copy link
Contributor Author

I can relate the tweak, makes more sense the place 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants