-
Notifications
You must be signed in to change notification settings - Fork 833
Adding parser support for N-d arrays up to rank 32 #13991
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
Conversation
tests/FSharp.Compiler.ComponentTests/Language/MultiDimensionalArrayTests.fs
Outdated
Show resolved
Hide resolved
tests/FSharp.Compiler.ComponentTests/Language/MultiDimensionalArrayTests.fs
Outdated
Show resolved
Hide resolved
|
@dsyme can I merge this? |
psfinaki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to ignore all the nitpicking - great job :)
tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
Show resolved
Hide resolved
tests/FSharp.Compiler.ComponentTests/Language/MultiDimensionalArrayTests.fs
Show resolved
Hide resolved
|
@vzarytovskii I guess this could have gone under a language version switch (though no real need to add now), and should count as an F# 7.0 feature. @T-Gro Could you add a very very short RFC under https://github.com/fsharp/fslang-design/tree/main/FSharp-7.0 please? thanks |
This PR extends the parser to support definition of types for multidimensional arrays.
Until now, only backtick syntax (e.g. int
[,,,,]) was supported.Within this PR, backticks are no longer needed.
[,,,,]Are the same type and are all supported.
The limitation of max. rank 32 is inherited by the limitation of System.Array, and the compiler will not allow int[.. 32 or more commas] as a type.