-
Notifications
You must be signed in to change notification settings - Fork 847
Closed
Labels
Milestone
Description
When the name of a member is incorrectly enclosed in parentheses, the error message is confusing.
For example, this code:
type T =
static member (x) = 0Causes the error:
Only simple variable patterns can be bound in 'let rec' constructs
This is confusing, because the code above doesn't contain any let rec constructs.
This also happens when a type annotation is included in the parentheses, e.g.:
static member (x:int) = 0I think a simple way to fix this would be to change the error message in this case to:
Only simple variable patterns can be bound in 'member' constructs
I noticed this when looking at this Stack Overflow question.