-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Avoid a LINQ usage in tensor extensions #109405
Conversation
This one, in particular, was causing an error with upcoming compiler changes: /vmr/src/runtime/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/QCallHandles.cs(39,26): warning CS9265: Field 'ByteRef._ref' is never ref-assigned to, and will always have its default value (null reference) [/vmr/src/runtime/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj] /vmr/src/runtime/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs(1168,30): warning CS8619: Nullability of reference types in value of type 'string[]' doesn't match target type 'Span<string?>'. [/vmr/src/runtime/src/libraries/System.Net.Http/src/System.Net.Http.csproj::TargetFramework=net10.0-linux] /vmr/src/runtime/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs(1208,42): warning CS8620: Argument of type 'string[]' cannot be used for parameter 'values' of type 'Span<string?>' in 'void HttpHeaders.ReadStoreValues<object?>(Span<string?> values, object? storeValue, HttpHeaderParser? parser, ref int currentIndex)' due to differences in the nullability of reference types. [/vmr/src/runtime/src/libraries/System.Net.Http/src/System.Net.Http.csproj::TargetFramework=net10.0-linux] /vmr/src/runtime/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaders.cs(1209,42): warning CS8620: Argument of type 'string[]' cannot be used for parameter 'values' of type 'Span<string?>' in 'void HttpHeaders.ReadStoreValues<string?>(Span<string?> values, object? storeValue, HttpHeaderParser? parser, ref int currentIndex)' due to differences in the nullability of reference types. [/vmr/src/runtime/src/libraries/System.Net.Http/src/System.Net.Http.csproj::TargetFramework=net10.0-linux] /vmr/src/runtime/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs(2661,56): error CS0023: Operator '.' cannot be applied to operand of type 'void' [/vmr/src/runtime/src/libraries/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj::TargetFramework=net10.0] 4 Warning(s) 1 Error(s)
Tagging subscribers to this area: @dotnet/area-system-numerics-tensors |
unblocks dotnet/sdk#43015 cc @ViktorHofer hopefully this is the only one which triggers "error" 😅 contributes to #108789 (comment) (still has other LINQ usages which aren't relevant to unblock sdk, can be fully addressed separately) |
It seems to me that both operations can be done using one loop? |
This one, in particular, was causing an error with upcoming compiler changes (last one is the
error
):