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
Overloads must be disjoint when computed on runtime types. They can have finer-grained types at check time, but must not overlap when types coarsen to the runtime times. Can have type variables at either runtime or check time, but cannot violate the previous two rules.
For instance, consider a function same_value(map<A, B>, A, A) --> bool which returns whether two map keys have the same value. The runtime type pattern for this must be (map, A, B) --> bool with independent type variables A and B, because the check-time notion of "same type" could include dyn, and each instance of dyn should coarsen to a fresh type variable.
The text was updated successfully, but these errors were encountered:
Overloads must be disjoint when computed on runtime types. They can have finer-grained types at check time, but must not overlap when types coarsen to the runtime times. Can have type variables at either runtime or check time, but cannot violate the previous two rules.
For instance, consider a function
same_value(map<A, B>, A, A) --> bool
which returns whether two map keys have the same value. The runtime type pattern for this must be(map, A, B) --> bool
with independent type variablesA
andB
, because the check-time notion of "same type" could includedyn
, and each instance ofdyn
should coarsen to a fresh type variable.The text was updated successfully, but these errors were encountered: