-
Notifications
You must be signed in to change notification settings - Fork 847
Closed
Labels
Milestone
Description
Please provide a succinct description of the issue.
Repro steps
Provide the steps required to reproduce the problem:
- The following minimal sample doesn't get any errors from Intellisense analysis, but does not build, and with no meaningful error message.
[<EntryPoint>]
let main args =
let doCalculation : string -> string list -> list<bool> = fun e r -> [true; false; true]
let bestChoices =
["one"]
|> Seq.map (fun context ->
context,
["two"]
|> List.ofSeq
|> Seq.groupBy (fun choice ->
[choice]
|> doCalculation choice
|> List.length
)
|> Seq.sortBy (fun (num, _) -> num)
)
|> Seq.map (fun (context, groupings) ->
context, Seq.maxBy (fun (num, _) -> num) groupings
)
Seq.iter (fun (context, num, choices) ->
List.iter (fun (num, buildings) ->
Seq.iter (printf "%A, ") buildings
) choices
) bestChoices
0
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
An intellisense message or a more detailed build error to indicate what the problem is.
Actual behavior
The build fails, with FS0001 error.
Known workarounds
Changing the outer Seq.iter to List.iter gives a correct error message both in intellisense and in the build errors.
Related information
- Windows
- .Net Core 8.0.100
- Happens both in Visual Studio and on
dotnet build
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done