Add support for calling local functions with dynamic args#10710
Add support for calling local functions with dynamic args#10710agocke merged 3 commits intodotnet:futurefrom
Conversation
There was a problem hiding this comment.
Pleas replace all vars with types.
|
@AlekseyTs I tried a slightly different approach to looking for dynamic arguments to a |
There was a problem hiding this comment.
Add [CompilerTrait(CompilerFeature.Dynamic)]
|
👍 |
There was a problem hiding this comment.
I don't think the second condition should be met. Consider this for example:
static void Test4(int x = 0, params int[] y)
{
dynamic z = x;
Test4(y: z);
}
Should probably add a unit-test for similar scenario.
Only exception is params parameters, tracked by dotnet#10708. Fixes dotnet#10389
There was a problem hiding this comment.
I was wondering how you handle "call by name" part when you do not know the mangled name of the method.
I see how :-) It is not supported for now.
There was a problem hiding this comment.
Correct -- that'll be a completely different implementation, so I didn't want to mix these things together in the same PR.
|
LGTM |
e0ec4be to
0d13966
Compare
|
Should the test be also marked as LocalFunctions tests? |
|
LGTM |
|
@AlekseyTs the test class is marked as a |
|
@jaredpar Thanks. |
…tnet#10710)" This reverts commit 1548892.
…args (dotnet#10710)"" This reverts commit 5777c60.
Only exception is params parameters, tracked by #10708.
Fixes #10389
@jaredpar @VSadov @dotnet/roslyn-compiler Please review.