-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Refactor/cleanup usages of MakeCallWithNoExplicitArgument helper #78273
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
Refactor/cleanup usages of MakeCallWithNoExplicitArgument helper #78273
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.