-
Notifications
You must be signed in to change notification settings - Fork 4.2k
More tests for 'with(...)' element scenarios. #80831
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
More tests for 'with(...)' element scenarios. #80831
Conversation
I assume because @CyrusNajmabadi merged main into this branch, and it isn't in the feature branch currently. |
…-arguments' into withError2
|
PR should be good again. |
|
Ok. I think review feedback accounted for. |
|
Would like to move further tests to other followups. |
|
|
||
| // PROTOTYPE: Spec says we should only allow arglist if trivial. Circle back on this and see if | ||
| // this just falls out with the 'allowArgList: true' below. If so, let LDM know it was easy and | ||
| // allow it. If it requires substantial work beyond this, disallow it for this feature. |
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.
resolved by email.
| <Field Name="Type" Type="TypeSymbol?" Override="true" Null="always"/> | ||
|
|
||
| <!-- With-arguments support for collection expression with(...) syntax. | ||
| PROTOTYPE: Determine if this is how we want to represent this data in this expression. --> |
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.
resolved by meeting today. #Closed
jcouv
left a comment
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.
LGTM Thanks (commit 74)
src/Compilers/CSharp/Test/Emit3/Semantics/CollectionExpressionTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Emit3/Semantics/CollectionExpressionTests_WithElement_Constructor.cs
Show resolved
Hide resolved
| var root = semanticModel.SyntaxTree.GetRoot(); | ||
|
|
||
| var (graph, symbol) = ControlFlowGraphVerifier.GetControlFlowGraph(root.DescendantNodes().OfType<BlockSyntax>().ToArray()[1], semanticModel); | ||
| ControlFlowGraphVerifier.VerifyGraph(compilation, """ |
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.
Uh... what happened to the ternary? This seems broken, I'd expect to see that extracted out and feeding into the collection creation as a flow capture. It also appears that the operation tree writer is not including the constructor in the output of a ICollectionExpressionOperation.
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.
Looks like ControlFlowGraph depends on IOp, which likely needs to be updated to include the creation expr. i'd really like to not do that in this PR if that's ok.
6c43cb7 to
b9fc660
Compare
333fred
left a comment
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.
Do we have a prototype comment tracking the IOperation work yet?
|
Not that i know of. |
Please add one. |
Sure. Added. |
329e403
into
dotnet:features/collection-expression-arguments

Also adds some support fo GetSymbolInfo on a with(...) element.
Relates to test plan #80613