What
The following error message is generated from this code snippet:
type Person = { Name : string; Age : int; City : string }
let x = { Name = "Isaac", Age = 21, City = "London" } // , instead of ;
error FS0001: This expression was expected to have type string but here has type 'a * 'b * 'c
Why
Newcomers to F# syntax (or otherwise!) may accidentally use , instead of ; as field separators. The error message is not helpful in this case - the inclusion of generics in the message further complicates matters and does not aid the developer with the real problem.
How
Replace the error message with something like: -
F# uses ; to separate fields values when creating a record, not , e.g. let x = { Name = "Isaac"; Age = 21 ... }