-
Notifications
You must be signed in to change notification settings - Fork 847
Closed
Labels
BugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Description
Type inference fails in this relatively simple scenario:
Repro steps
Write this:
type T = T with
static member (+.) (T, x) = x : int
static member (+.) (T, x) = x : string
static member inline Add source = T +. source
static member (+.) (T, x) = x
Expected behavior
To compile, or at least type check
Actual behavior
~vs8323.fsx(4,41): error FS0001: This expression was expected to have type
'_arg3
but here has type
'b
Known workarounds
Move the overload up
Metadata
Metadata
Assignees
Labels
BugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.