csharplang icon indicating copy to clipboard operation
csharplang copied to clipboard

[Proposal]: Better Conversion from Collection Expression (VS 17.12, .NET 9)

Open 333fred opened this issue 1 year ago • 0 comments

Better conversion from collection expression

  • [x] Proposed
  • [ ] Prototype: Not Started
  • [ ] Implementation: Not Started
  • [x] Specification: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-13.0/collection-expressions-better-conversion.md

Summary

Updates to the better conversion rules to be more consistent with params, and better handle current ambiguity scenarios. For example, ReadOnlySpan<string> vs ReadOnlySpan<object> can currently cause ambiguities during overload resolution for [""]. This is an issue because .NET 9 is adding such methods to string.Concat, which we need to address in the language.

Design meetings

333fred avatar Aug 20 '24 16:08 333fred