Skip to content
Discussion options

You must be logged in to vote

They don't fit together. Return types must be covariant, parameter type contravariant.

The contract of Foo::bar is that it always throws. Bar::bar violates that.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@shaedrich
Comment options

@ondrejmirtes
Comment options

@shaedrich
Comment options

@staabm
Comment options

staabm Jul 2, 2026
Collaborator

Answer selected by shaedrich
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
3 participants