We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a perfectly valid code that doesn't compile in Release mode, when defining value let subStr in the code below.
let subStr
open FSharp.Data type StatsResponse = JsonProvider<"""[ { "yesCount": 983, "moyCount": 458, "noCount": 280, "alertCount": 3, "idSection": 94, "sectionName": "Section A" }]"""> type Stats(sectionStats: StatsResponse.Root[]) = let sectionIdToStatsMap = sectionStats |> Seq.map (fun stats -> stats.IdSection, stats) |> dict member val SectionStats = sectionIdToStatsMap.Values let generateReportFromStats (clientStats: #seq<string * Stats>) = clientStats |> Seq.iter (fun (clientName, stats) -> // BUG: it works when swapping the two following lines let orderedStats = stats.SectionStats let subStr = clientName.Substring(23) for s in orderedStats do printfn "%s" subStr ) [<EntryPoint>] let main argv = printfn "%A" argv 0 // return an integer exit code
Code should compile.
Code doesn't compile with error: Undefined value 'subStr : string'
Undefined value 'subStr : string'
Swap the two lines that start by: let subStr and let orderedStats.
let orderedStats
The text was updated successfully, but these errors were encountered:
@OkayX6 could you check if #742 is the issue by applying the work around?
Sorry, something went wrong.
I reproduced with the compiler from VS2015, but somehow I can't reproduce with master.
But I get.
@smoothdeveloper Yes, the workaround is working, so it's unrelated to TypeProviders :).
Since this is a duplicate of a bug that has been fixed I will close this
No branches or pull requests
I have a perfectly valid code that doesn't compile in Release mode, when defining value
let subStr
in the code below.Repro steps
Expected behavior
Code should compile.
Actual behavior
Code doesn't compile with error:
Undefined value 'subStr : string'
Known workarounds
Swap the two lines that start by:
let subStr
andlet orderedStats
.Related information
The text was updated successfully, but these errors were encountered: