InlineArray fails at runtime when declared as a ref struct. #71058
Labels
4 - In Review
A fix for the issue is submitted for review.
Area-Compilers
Bug
Feature - Inline Arrays
Milestone
It appears
[InlineArray]
structs cannot beref
structs because they need to be passed as generic arguments to helper methods in the runtime. I think this should be a compile-time error.Version Used:
.NET 8 SDK 8.0.100
Compiler version: '4.9.0-2.23571.2 (d1b2e28)'. Language version: 12.0.
Steps to Reproduce:
run this:
The program fails when trying to convert variable
y
toSpan<char>
.Expected Behavior:
An error is emitted at compile-time.
Actual Behavior:
An exception is thrown at runtime.
The text was updated successfully, but these errors were encountered: