-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recursive resolving of generic arguments types in registration of methods in javascript translation #892
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comments in code and also please add unit tests for the behavior you have implemented - I don't see a reason to rely on UI tests for this. You can either add them as BindingCompilationTests
or JavascriptCompilationTests
(first option should be more stable, second also covers the translation to JS).
…ethod resolution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, and thanks for the tests. Could you please just have a look at the generic types in arrays?
return method; | ||
var methods = FindValidMethodOveloads(type.GetAllMembers(flags).OfType<MethodInfo>().Where(m => m.Name == name), typeArguments, arguments, namedArgs).ToList(); | ||
|
||
if (methods.Count == 1) return methods.FirstOrDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: This special case is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
This PR rewrites resolving of generic arguments in ExpressionHelper.
Example 1:
This registration is already allowed - this is how it was implemented so far.
Example 2:
This registration is not allowed in the current implementation. This PR makes it possible.