Replies: 2 comments
-
This looks like a duplicate of #151. |
Beta Was this translation helpful? Give feedback.
0 replies
-
It does look similar, however I believe definition in this issue is more clean and straightforward. Am I bias? 😄 |
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.
-
It'd be really nice if class constructors could recognize Generic Type Argument for the class. That would allow to instantiate generic classes for Anonymous types much easier without helper methods.
Actual behavior 👎 👎 👎
Desired behavior 👍 👍 👍
Another examples of Desired behavior where it could be sweet 🍬 🍰 🍯
Additional nice-to-haves ⭐ ⭐ ⭐
Potential issue: class can implement multiple interfaces with different generic types e.g.:
MyCustomDictionary: IDictionary<string, T> and IDictionary<object,T>
Potential solution: for that situation return compilation error, something like "Cannot do inference of generic type arguments, because unambiguous...".
Created separate issue Proposal: Local Type Alias for anonymous types #430, but specifics for this issue could be "guessed" generic type argument:
Beta Was this translation helpful? Give feedback.
All reactions