-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Potential source breaking changes due to params collection #73857
Comments
@cston I believe this is the issue you were mentioning to me. We should see what the spec says and if we got it wrong in the spec or the impl. My expectation would 100% be that I'm thinking we might have spec'ed this wrong, but the above was definitely the intent. :) |
Currently, better conversion rules for collection expressions treat this case as ambiguous. Perhaps there should be an additional rule to prefer |
Note that this is a |
* Initial prototype work * Correctly handle spreads * Update test baselines * Add dedicated interpolated string handler test * Implement params changes and update tests * Support falling back to C# 12 rules. * Add more tests, including the table from https://github.com/dotnet/csharplang/blob/main/proposals/collection-expressions-better-conversion.md and an explicit test for #73857. * Add tests to the CSharp 12 list as well * Update language feature status. * Cleanup * Correct spread handling * Only include expected output on .NET Core * PR feedback. * Add suggested numeric test. * Document breaking changes * More feedback. * Add examples * Add example of interpolated string breaking change * PR feedback * Update language feature status. * More tests around dynamic and tuples * Add collection expressions to test plan * Spread testing
@333fred can this be closed now? |
Version Used: 9.0.100-preview.6.24304.2
Steps to Reproduce:
Diagnostic Id: CS0121
Expected Behavior: No compilation error
Actual Behavior:
Note that this is a source breaking change from C# 12 where the code used to compile.
The text was updated successfully, but these errors were encountered: