open FSharp.Core.CompilerServices.StateMachineHelpers
// or use something from it:
member inline _.Zero() : TaskSeqCode<'T> = ResumableCode.Zero()
Expected behavior
No warning, as this was introduced for F# 6 as part of task and that RFC has introduced new language features, among which resumable code.
Actual behavior
Warnings are shown when compiling:
warning FS0057: Experimental library feature, requires '--langversion:preview'. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'.
Interestingly, the code compiles just fine. Which suggests to me that indeed, this library feature is part of F# 6 and the warning saying to use --langversion:preview is not needed.
I may be wrong on that, but so far the code performs normally.
@abelbraaksma ... it turns out that we left the experimental attributes in F# Core. Coincidentally I removed them just last week, so can you try to repro with a build from Main.
Basically, just using anything from
FSharp.Core.CompilerServices.StateMachineHelpers
throws the FS0057 warning.I noticed these while experimenting with the
taskSeq
code from the F# perf tests, i.e.: https://github.com/dotnet/fsharp/blob/d5312aae8aad650f0043f055bb14c3aa8117e12e/tests/benchmarks/CompiledCodeBenchmarks/TaskPerf/TaskPerf/taskSeq.fsRepro steps
Expected behavior
No warning, as this was introduced for F# 6 as part of
task
and that RFC has introduced new language features, among which resumable code.Actual behavior
Warnings are shown when compiling:
Interestingly, the code compiles just fine. Which suggests to me that indeed, this library feature is part of F# 6 and the warning saying to use
--langversion:preview
is not needed.I may be wrong on that, but so far the code performs normally.