-
Notifications
You must be signed in to change notification settings - Fork 833
Closed
Labels
Area-Diagnosticsmistakes and possible improvements to diagnosticsmistakes and possible improvements to diagnosticsFeature ImprovementTheme-Simple-F#A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.
Milestone
Description
Consider this code:
type MyId =
| IdA of int
| IdB of string
member this.IdA =
match this with
| IdA x -> Some x
| _ -> None
let onlyIdA (ids: MyId list) = ids |> List.choose _.IdAThe last line fails to compile with an error on _.IdA:
Error FS0812 : The syntax 'expr.id' may only be used with record labels, properties and fields
I would expect this to compile, since IdA is indeed a property.
Metadata
Metadata
Assignees
Labels
Area-Diagnosticsmistakes and possible improvements to diagnosticsmistakes and possible improvements to diagnosticsFeature ImprovementTheme-Simple-F#A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.
Type
Projects
Status
Done