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

Extension types - add updated inference rules for num types. #3384

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lrhn
Copy link
Member

@lrhn lrhn commented Oct 6, 2023

No changes intended, but the existing rules are phrased based on assumptions that are no longer true with extension types. Adds more restrictions on when the rules apply, to rule out things that previously couldn't happen.

No changes intended, but the existing rules are phrased based
on assumptions that are no longer true with extension types.
Adds more restrictions on when the rules apply, to rule out
things that previously couldn't happen.
@lrhn lrhn requested a review from eernstg October 6, 2023 17:07
@lrhn
Copy link
Member Author

lrhn commented Oct 6, 2023

This is a smaller, more focused, subset of my earlier PR.

It makes the new rules precise and explicit. I'm writing tests to match.
(We can obviously discuss the actual rules, but I think they're "safe enough".)

@lrhn lrhn changed the title Add updated inference rules for num types. Extension types - add updated inference rules for num types. Oct 6, 2023
It's a change, and it may require inserting a new dynamic
downcast, which the current semantics does not.
(We should decide whether we want this to act like real
"overloading", and if so, how to resolve, or if we should
just have rules that are "good enough" for most common
use-cases.)
@eernstg
Copy link
Member

eernstg commented Oct 12, 2023

Discussed this IRL yesterday: We will return to this later if needed.

@lrhn
Copy link
Member Author

lrhn commented Oct 12, 2023

We will, as a minimum, need to say that the rules only apply if invoking an instance method, not an extension type method.
I'll prepare a PR saying just that.

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

Successfully merging this pull request may close these issues.

None yet

2 participants