Fix pattern based arguments in ForEachLoopOperationInfo without binding assumptions#59887
Merged
333fred merged 13 commits intodotnet:mainfrom Mar 7, 2022
Merged
Conversation
Contributor
Author
|
@333fred can you have a look? |
…ionInfoArguments2
333fred
reviewed
Mar 3, 2022
src/Compilers/CSharp/Portable/Operations/CSharpOperationFactory.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/IOperation/IOperation/IOperationTests_IForEachLoopStatement.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/IOperation/IOperation/IOperationTests_IForEachLoopStatement.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/IOperation/IOperation/IOperationTests_IForEachLoopStatement.cs
Show resolved
Hide resolved
src/Compilers/CSharp/Test/IOperation/IOperation/IOperationTests_IForEachLoopStatement.cs
Show resolved
Hide resolved
…y.cs Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
…s_IForEachLoopStatement.cs Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
…s_IForEachLoopStatement.cs Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
…ionInfoArguments2
…ub.com/bernd5/roslyn into fix_ForEachLoopOperationInfoArguments2
Contributor
Author
|
@333fred good point - it is good to check especially the line values |
333fred
approved these changes
Mar 3, 2022
Member
333fred
left a comment
There was a problem hiding this comment.
LGTM (commit 10). @AlekseyTs @dotnet/roslyn-compiler for a second review.
…ionInfoArguments2
cston
reviewed
Mar 4, 2022
src/Compilers/CSharp/Test/IOperation/IOperation/IOperationTests_IForEachLoopStatement.cs
Outdated
Show resolved
Hide resolved
cston
reviewed
Mar 4, 2022
src/Compilers/CSharp/Test/IOperation/IOperation/IOperationTests_IForEachLoopStatement.cs
Show resolved
Hide resolved
cston
approved these changes
Mar 4, 2022
…ionInfoArguments2
Member
|
Thanks for the contribution @bernd5! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While looking for a new public IArgumentOperation API for pattern based calls (Dispose / GetEnumerator / MoveNext) I have seen that the non public class
ForEachLoopOperationInfois not filled correclty withIArgumentOperation.This PR makes use of the new
MethodArgumentInfoand fixes the missing IArgumentOperations in ForEachLoopOperationInfo (see the test cases).This PR removes explicitly the
IsExtensionMethodcheck - this should and is handled during binding - but not in the IOperationsFactory.