You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected type constraint mismatch error (FS0193) #16804
When type checker sees a constraint 'U :> IBase<string> and 'U :> IBase<int> for the same type variable, it unifies string and int. One of the reasons why multiple instantiations of generic interfaces was not supported in F#.
Activity
vzarytovskii commentedon Mar 4, 2024
It is by design, given simplified code:
When type checker sees a constraint
'U :> IBase<string> and 'U :> IBase<int>for the same type variable, it unifiesstringandint. One of the reasons why multiple instantiations of generic interfaces was not supported in F#.It has a separate language suggestion: fsharp/fslang-suggestions#1036