-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix erased context function types, 2nd attempt #13736
Conversation
Otherwise LGTM |
def erasedName = | ||
if ref.is(Flags.Method) | ||
&& contextResultsAreErased(ref.symbol) | ||
&& (ref.owner.is(Flags.Trait) || ref.symbol.allOverriddenSymbols.hasNext) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from breaking binary compatibility is there another reason not to name all contex function dirrect accessors with $direct
? It seems that nameing all these methods with $direct
would also solve some of the other overloading issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name mangling is always bad because it confuses tack traces and (in this case) causes more indirection via bridge methods, which blows up code sizes. So I'd avoid it if we don't absolutely need it.
Add a `$` to the name of a method that has erased context results and that may override some other method. This is to prevent the two methods from having the same names and parameters in their erased signatures. We need a bridge between the two methods, so they are not allowed to already override after erasure.
Use "$direct" instead of just "$" to prevent erasure clashes of methods with erased context function results.
Add a
$
to the name of a method that has erased context results and thatmay override some other method. This is to prevent the two methods from having
the same names and parameters in their erased signatures. We need a bridge between the
two methods, so they are not allowed to already override after erasure.