-
Consider: class Base<T> where T : struct {
public virtual void M(T v) { }
}
class Derived<T> : Base<T> where T : struct {
public override void M(T v) { }
public void M(T? v) {
this.M(default(T)); // resolves to Derived<T>.M(T?)
}
} Even though a more specific overload "exists" as The workaround is to cast |
Beta Was this translation helpful? Give feedback.
Answered by
svick
Dec 12, 2021
Replies: 1 comment 5 replies
-
|
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
alrz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes: