docs icon indicating copy to clipboard operation
docs copied to clipboard

Collection Expressions Documentation Lists Convertion To Inline Array

Open MrKWatkins opened this issue 1 year ago • 1 comments

Issue description

The conversions section of the collection expressions docs (https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/collection-expressions#conversions) states that conversions to inline arrays are supported. However this does not seem to be the case; I get CS9174 when I try, and https://github.com/dotnet/roslyn/issues/69236 / https://github.com/dotnet/roslyn/issues/68927 imply that support for conversion to inline arrays didn't make it into C#12. I'm therefore assuming the docs are incorrect?

Target framework

  • [ ] .NET Core
dotnet --info output or About VS info
.NET SDK:
 Version:           8.0.100
 Commit:            57efcf1350
 Workload version:  8.0.100-manifests.2d90560f

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  23.10
 OS Platform: Linux
 RID:         ubuntu.23.10-x64
 Base Path:   /usr/lib/dotnet/sdk/8.0.100/

.NET workloads installed:
 Workload version: 8.0.100-manifests.2d90560f
There are no installed workloads to display.

Host:
  Version:      8.0.0
  Architecture: x64
  Commit:       5535e31a71

.NET SDKs installed:
  6.0.125 [/usr/lib/dotnet/sdk]
  7.0.114 [/usr/lib/dotnet/sdk]
  8.0.100 [/usr/lib/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.25 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.14 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.25 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.14 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

MrKWatkins avatar Dec 29 '23 12:12 MrKWatkins

I hope this will get attention. Working with "InlineArray" without collection expresion is very annoying.

PavelCibulka avatar Jan 10 '24 08:01 PavelCibulka