Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify language spec regarding overloads #180

Open
JimLarson opened this issue Feb 4, 2021 · 0 comments
Open

Clarify language spec regarding overloads #180

JimLarson opened this issue Feb 4, 2021 · 0 comments
Assignees

Comments

@JimLarson
Copy link
Contributor

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.

@JimLarson JimLarson self-assigned this Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@JimLarson and others