-
Notifications
You must be signed in to change notification settings - Fork 827
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.
Milestone
Description
While writing #8521 I came across this magnificent internal error while copying and editing some code:
type Foo =
static member Bar (x: int) = ()
static member Bar (x: bool) = ()
static member inline Invoke< ^N, 'a, 'b when (Foo or ^N): (static member Bar: 'a -> 'b)> source =
let inline call (_: ^M, a) =
((^M or ^N): (static member Bar: _ -> _)(a))
call (Unchecked.defaultof<Foo>, source)
type Hober =
static member Hoberator (x: int) = ()
static member Hoberator (x: bool) = ()
static member inline Invoke< ^N, 'a, 'b when (Hober or ^N): (static member Hoberator: 'a -> 'b)> source =
let inline call (_: ^M, a) =
((^M or ^N): (static member Hoberator: _ -> _)(a))
call (Unchecked.defaultof<Foo>, source)
error FS0043: A type parameter is missing a constraint 'when (Foo or ^N) : (static member Hoberator : '?1539481 -> '?1539482)'
error FS0073: internal error: couldn't remap internal value 'Hoberator'
error FS0073: internal error: couldn't remap internal value 'Hoberator'
error FS0073: internal error: couldn't remap internal value 'Invoke'
error FS0073: internal error: couldn't remap internal tycon type Hober <> =
class
end
with
Hoberator : int -> unit
! compiled_name! = Hoberator
membInfo-slotsig! = []
# arity<0>[1]
Hoberator : bool -> unit
! compiled_name! = Hoberator
membInfo-slotsig! = []
# arity<0>[1]
Invoke : !< ^_N when ^_N : trait
^_N : trait,'_a,'_b> '_?1539481 -> '_?1539482
! compiled_name! = Invoke
membInfo-slotsig! = []
# arity<3>[1]
end
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.