-
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
Add inline
changes semantics
#15374
Comments
Seems related to #15327 |
Can somebody else take a look at it? |
If you can give some hints, I can try to tackle the problem @odersky @nicolasstucki. It seems the underlying problem is with the outer-select encoding: given |
This issue was picked for the Issue Spree 18 of July 5th which takes place in a week from now. @griggt @gagandeepkalra will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here. |
When we inline the code we probably need to find the references to the outer I see we get this class C() extends Object() {
var b: B = new B()
def b_=(x$1: B): Unit = ()
{
val X_this: (B#y : B#Y) = this.b.y
val A_this: (B#a : A) = X_this.1_<outer> // suspicious reference
A_this.inline$foo():Unit
}
} We should first try to:
|
I imagine we need something like val X_this: (B#y : B#Y) = this.b.y
val A_this: (B#a : A) = this.b.a
A_this.inline$foo():Unit It seems that we even have the correct type projection in |
I think I incorrectly put the number 15327 in the registration. It should be the current issue. |
This issue was picked for the Issue Spree 18 of July 5th which takes place in a week from now. @liufengyun @jodersky @dwijnand @manojo will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here. |
The elaboration above is a little problematic, as the elaborated code now calls the mutable field getter |
…ss symbol If we have an outer select `e.outer_<hops>`, we must make sure that the class symbol of `e` is the class where the outer this is located in. Otherwise, the phase `ElimOuterSelect` would get confused. Co-authored-by: Dale Wijnand <dale.wijnand@gmail.com>
The PR seems viable. I was coming back to this to ask: seeing |
…ss symbol If we have an outer select `e.outer_<hops>`, we must make sure that the class symbol of `e` is the class where the outer this is located in. Otherwise, the phase `ElimOuterSelect` would get confused. Co-authored-by: Dale Wijnand <dale.wijnand@gmail.com>
Fix #15374: Make sure prefix of outer select has the correct class symbol
Compiler version
master
Minimized code
Output
Expectation
It should print 10, but it prints 20.
Initial Diagnosis
The problem seems to be related to the encoding of outer-select in inlining. The example above seems to suggest that hops alone is ambiguous.
The text was updated successfully, but these errors were encountered: