Please consider the following record definitions:
type A = { F1 : int; F2 : int }
type B = { F1 : int; F3 : int }
// error FS0656: This record contains fields from inconsistent types
let a1 = { F1 = 1; F2 = 2 }
// this works
let a2 = { A.F1 = 1; F2 = 2 }
I don't understand, why a1 results in an error.
All the examples I could find of why you have to do it the a2-way assume that all the field-names in A and B have the same name - which is of course ambiguous, but shouldn't A and B be distinguishable when having at least one distinct field?
Maybe this ist just the way F# evaluates this and adding the type name to the first field is of course no big deal, but I'm just curious.
EDIT: Thanks for the answers which helped me notice something rather strange: The whole snippet works, when I evaluate it the first time (ALT+Enter in VS 2010).
When I try to evaluate a second time, I get the error.
If nobody can reproduce this my installation of VS is probably borked...
EDIT2 (alright, time to create an account here, sorry for the edits) Thanks wmeyer (and everyone else) for taking the time to look at the problem and making me aware of my misunderstanding how FSI works. All cleared up now!