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

AddressOf does not wrap compatible signatures in lambdas anymore #1153

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gaschd
Copy link

@gaschd gaschd commented Nov 5, 2024

#1148

Problem

AddressOf delegates are wrapped in lambdas when delegate signatures are not equal but still compatible.
This behaviour is implemented correctly for base and derived classes but not for interfaces.

Solution

Using InheritsFromOrEquals overload with the option to include interfaces for delegates that widen the return type to an interface that is implemented by the type or narrow the input parameters types to classes implementing the interface.

@gaschd gaschd changed the title Issue 1148 incompatible delegate signature AddressOf does not wrap compatible signatures in lambdas anymore Nov 5, 2024
@GrahamTheCoder
Copy link
Member

Thanks for the PRs, will try to look on the weekend

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.

2 participants