Address test plan for target-typed new#29167
Address test plan for target-typed new#29167gafter merged 38 commits intodotnet:features/target-typed-newfrom
Conversation
|
Please review #25196 before reviewing this. |
|
Binary operators are not wholly tested yet. Pending design decision on how we want them to behave. See #28489 (comment) |
0de6176 to
4319b86
Compare
|
Could you rebase please? I merged the previous PR, and for some reason those deltas are showing up here. |
4319b86 to
30507d5
Compare
So, I got a bit confused on tuples. Latest LDM notes say they should be allowed. Can you fix or add a Refers to: src/Compilers/CSharp/Portable/Binder/Binder_Conversions.cs:230 in 30507d5. [](commit_id = 30507d5, deletion_comment = False) |
nit: consider renaming Refers to: src/Compilers/CSharp/Portable/Binder/Binder_Operators.cs:2279 in 30507d5. [](commit_id = 30507d5, deletion_comment = False) |
jcouv
left a comment
There was a problem hiding this comment.
Code change looks good (iteration 4). I'll finish reviewing the tests tomorrow. Thanks
If not already tested, another params scenario would be interesting: Thinking about array initializers, here's another idea: Refers to: src/Compilers/CSharp/Test/Semantic/Semantics/TargetTypedNewTests.cs:172 in 30507d5. [](commit_id = 30507d5, deletion_comment = False) |
// The old native compiler ignores ref/out in a delegate creation expression.
// For compatibility we implement the same bug except in strict mode.
// Note: Some others should still be rejected when ref/out present. See RefMustBeObeyed.Do we need to do this in new()? since it's for |
gafter
left a comment
There was a problem hiding this comment.
Looks great. We'll turn the PROTOTYPE comments into an issue and deal with that separately.
|
@gafter for second sign-off. Thanks I'll close and re-open the PR to kick CI. |
|
I'll close and re-open the PR to kick CI. |
|
We'll need to refresh the |
|
I attempted a merge from compilerNext and turns out I'll have to read the parser from the top. I noticed there's an assert to avoid lookaheads for new expressions, @gafter do you intend to keep this for new() as well? iow with the new parser logic, do we still need lookaheads for this work? |
|
I don't recall the reason for the restriction/assertion. I believe the parser does require look-ahead for parsing types in patterns. |
Follow-up #25196
Test plan: #28489