The error/warning messages for reserved keywords are inconsistent and sometimes very misleading. Notably those that are reserved because they are keywords in OCaml all produce the message "error FS0010: Unexpected infix operator in binding".
This confused me no end when I first saw it.
Repro steps
> let land = 3;;
let land = 3;;
----^^^^
/home/user/stdin(1,5): error FS0010: Unexpected infix operator in binding
Expected behaviour
An error message that tells me not to use "land" as a variable name.
e.g. error FS0010: Unexpected keyword 'land' in binding
or maybe an error like the following warning warning FS0046: The identifier 'fori' is reserved for future use by F#
Actual behaviour
The compiler complains about an infix operator. I assume that the compiler is confused by the equals sign between the reserved keyword and the value.
Related information
The error/warning messages for reserved keywords are inconsistent and sometimes very misleading. Notably those that are reserved because they are keywords in OCaml all produce the message "error FS0010: Unexpected infix operator in binding".
This confused me no end when I first saw it.
Repro steps
Expected behaviour
An error message that tells me not to use "land" as a variable name.
e.g.
error FS0010: Unexpected keyword 'land' in bindingor maybe an error like the following warning
warning FS0046: The identifier 'fori' is reserved for future use by F#Actual behaviour
The compiler complains about an infix operator. I assume that the compiler is confused by the equals sign between the reserved keyword and the value.
Related information
TrackingError reporting improvements #1103