-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support for Inline arrays in C# 12 preview? #78
Comments
Is anyone working on this? I may be willing to do so, but I'm hesitant because I don't have much experience with source generators. |
This is planned (along with all other new polyfills for C# 12), just waiting for the language to be stable first 🙂 |
Hey Sergio, I love your work! Following on from the C#12 theme, with .NET 8 now released I can’t wait to start using it! Are you able to share the plans for C#12 support? Is there anything the community can do to help? Thanks :) |
Hmm, today I was curious how we can do things by ourselves. So I decided to play around with things myself in order to see how far I can get, and what happened was actually quite interesting. After setting my csproj TFM to net481 I got several errors, but most obviously that the Another error shown about missing However, after these actions, the following more serious compiler error still remained:
To me, that suggests that the current situation is that inline arrays are actually impossible on .NET Framework at all, or at least that the Roslyn compiler itself does not allow you to do this at least. So in that case PolySharp alone will not be able to solve it either I guess... |
Oh, I forgot this one. Actually completed by #81.
That is correct, it requires runtime support. This is why it's part of the "runtime supported" attributes which are dummy and don't actually do anything (like eg. |
https://devblogs.microsoft.com/dotnet/new-csharp-12-preview-features/#inline-arrays
The text was updated successfully, but these errors were encountered: