Skip to content

Conversation

@dakur
Copy link
Contributor

@dakur dakur commented Oct 19, 2022

backport of #71 to v3.1

@dg
Copy link
Member

dg commented Oct 19, 2022

It is simply not possible to change signatures for interface methods because of backward compatibility.

@dakur
Copy link
Contributor Author

dakur commented Oct 20, 2022

Why? The type is widened, not narrowed, so it is backward compatible. Or do I overlook something?

@mabar
Copy link

mabar commented Oct 20, 2022

Only final implementations can safely widen accepted types. Doing so in extendable methods and interfaces is BC break, because implementations have to do it too.

@dakur
Copy link
Contributor Author

dakur commented Oct 20, 2022

Oh, I see, thanks for explanation.. So I'm closing this and leaving only #71

@dakur dakur closed this Oct 20, 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.

3 participants