-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
priority of a forwarded static extension #9680
Comments
I agree, they should. |
By the way, this will fix an example in last comment of #5924. |
The original intent of The behavior described here is an implementation detail which comes from the call stack. Given an abstract
Expanding the recursion we then get this:
The question now is what we want instead. I think this actually goes beyond the static extension and both the mysterious If we agree that static extensions on the abstract should take priority, then the only logical answer is to have this order:
Before we continue, we'll have to agree if this is indeed what we want. I don't have much intuition for this and merely go by the pattern here. |
The weird And then modified here: I still don't get what this is doing because |
Now that there's no mysterious "this" thing involved the resolution order would look like this:
which makes sense to me. |
That makes sense to me too, but it's not quite what #9682 implements, I think. |
Yes, #9682 didn't take into account existence of So, to implement it, maybe we can go with some additional field in |
With new priority for
Because if you simply wrap a type with a transparent (with forward and direct casts, optionally transitive) abstract, it shouldn't give
|
Example:
Right now resolution order for a field of abstract with forwarding is:
Shouldn't last two be other way around?
The text was updated successfully, but these errors were encountered: