You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had a deeper look at this (together with @stefan-lindegger), and at the moment there's no covariance support at class or struct level (see this post from Eric Lippert).
Our use case is covered in this discussion 2498 in the C# language repo, I'd keep this issue open until they've clarified there if and in what manner the language is moving forwards on that matter.
It should be possible to return a
Maybe<Bar>
in a method with return typeMaybe<Foo
>, whereBar
inherits fromFoo
.The text was updated successfully, but these errors were encountered: