"Does Not Inherit" Constraint #1796
Unanswered
TonyValenti
asked this question in
Q&A
Replies: 3 comments
-
I don't think the constraint you're applying to Untested, but you might be able to do this:
That said, I don't see from this toy example why you'd actually need this - it seems that |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for confirming. 😁 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the right way to write this code?
I want to implement a "specific" and generic instance of an interface but when I try, I get the "Cannot implement both... because they may unify for some type parameters" although I don't see any possible substitution of T that would result in
IAdd<T>
unifying to IAdd.Do I really have to have an
IAdd<T>
and IAdd interface?Beta Was this translation helpful? Give feedback.
All reactions