You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiler error:
"From the end slicing with requires language version 5.0, use /langversion:preview."
I've since learned that this is not yet included in F#6, but it is still in the preview of the language, so I think this should be changed to:
"From the end slicing with requires language version 6.0, use /langversion:preview."
Provide the steps required to reproduce the problem:
Either use your IDE to get error feedback or run dotnet build to view the errors
If possible attach a zip file with the repro case. This often makes it easier for others to reproduce.
The zip file should ideally represent the situation just before the call/step that is problematic.
Expected behavior
Error should be:
"From the end slicing with requires language version 6.0, use /langversion:preview."
Actual behavior
Compiler error: From the end slicing with requires language version 5.0, use /langversion:preview.
Known workarounds
You can still set <LangVersion>preview</LangVersion> but the error is slightly misleading.
I was naively expecting that 'from the end slicing and indexing' would be moved from F#5 Preview to F#6.
But when trying out the following code (taken from F# RFC FS-1076) produces a compiler error when using F# 6.
Compiler error:
"From the end slicing with requires language version 5.0, use /langversion:preview."
I've since learned that this is not yet included in F#6, but it is still in the preview of the language, so I think this should be changed to:
"From the end slicing with requires language version 6.0, use /langversion:preview."
Provide the steps required to reproduce the problem:
Either use your IDE to get error feedback or run
dotnet build
to view the errorsIf possible attach a zip file with the repro case. This often makes it easier for others to reproduce.
The zip file should ideally represent the situation just before the call/step that is problematic.
Expected behavior
Error should be:
"From the end slicing with requires language version 6.0, use /langversion:preview."
Actual behavior
Compiler error:
From the end slicing with requires language version 5.0, use /langversion:preview.
Known workarounds
You can still set
<LangVersion>preview</LangVersion>
but the error is slightly misleading.Related information
Provide any related information (optional):
Operating system
.NET Runtime kind (.NET Core, .NET Framework, Mono)
.NET 6
Editing Tools (e.g. Visual Studio Version, Visual Studio)
Visual Studio Code
The text was updated successfully, but these errors were encountered: