Refactor/cleanup usages of MakeCallWithNoExplicitArgument helper#78273
Refactor/cleanup usages of MakeCallWithNoExplicitArgument helper#78273AlekseyTs merged 1 commit intodotnet:mainfrom
Conversation
|
@dotnet/roslyn-compiler Please review |
| BoundExpression enumeratorVarInitValue = SynthesizeCall(getEnumeratorInfo, forEachSyntax, receiver, | ||
| allowExtensionAndOptionalParameters: isAsync || getEnumeratorInfo.Method.IsExtensionMethod || getEnumeratorInfo.Method.GetIsNewExtensionMember(), firstRewrittenArgument: firstRewrittenArgument); | ||
| BoundExpression enumeratorVarInitValue = MakeCall(getEnumeratorInfo, forEachSyntax, receiver, | ||
| firstRewrittenArgument: firstRewrittenArgument); |
There was a problem hiding this comment.
If I understand correctly, previously we asserted that there are no arguments if allowExtensionAndOptionalParameters is false and proceeded to emit a call without arguments, now that assert is gone and in Release builds we proceed to emit a call with arguments. Is it worth preserving the assert at least? #Resolved
There was a problem hiding this comment.
Is it worth preserving the assert at least?
The assert made sense on a code path that wouldn't do the right thing in presence of arguments. i.e. the arguments would be dropped, That code path is gone, now the arguments will never be dropped, IL comparison tests ensure the generated code is what we expect.
|
@dotnet/roslyn-compiler For the second review |
|
@dotnet/roslyn-compiler For the second review |
1 similar comment
|
@dotnet/roslyn-compiler For the second review |
No description provided.