-
Notifications
You must be signed in to change notification settings - Fork 21
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
Error in code execution order, possibly related to stabilization issues #11397
Comments
@milessabin could you investigate whether we need to fix this in RC1? |
I'll take a look. |
@adriaanm I'm afraid I'm not going to have time to dig in to this for a week or two. |
I'm taking a quick look today (Tuesday) before my commute. I'll delete this post when I am positively stymied. I thought I had a half-line fix, so now I kind of want to figure it out. There was a huge backup on the 85N this morning, which I saw from the 85S while chauffeuring to morning school. So my next commute is really "second commute" as we say "second breakfast". |
tentatively labeling as "blocker", pending investigation |
The bug lies in: .. which chooses to put
Synthetic stabilizing vals are only added when the called method is a dependent method type. Still a blocker, but limited somewhat in it scope. |
Yes, my one-liner was in the code finding the "insertion context", it should look for the Block. I'll take another look before I'm down for the night. But maybe this has to be fixed right now Australia time because it's a contract issue. It's quite ominous that there is a link to "The Future of Typelevel Scala". (dum, da-dum) |
I'm looking at this now ... |
@retronym is spot on ... stabilizing vals shouldn't be pulled out over by name argument positions. |
@milessabin Me too. If you have better things to do. I'm just back from chauffeuring the child... |
@som-snytt please take it if you want it :-) |
I don't want it, but maybe I need it. Maybe I got it wrong, using half the brain, the way dolphins sleep without drowning. |
Worth adding that the workaround is to turn the arg expression into a block.
|
It turns out the general problem was not completely fixed. Opened #11756 |
Possibly related to #10714 which was fixed in scala/scala#6312
The following code demonstrates an error in code execution order.
An assertion placed show exactly where the error occurs.
Affected Scalac version: from 2.13.0-M4
2.13.0-M2 is OK. 2.13.0-M3 causes a crash as demonstrated in #10714
The reason I'm thinking it's related to the stabilization bug is that if we change the code to the following, there is no error:
The text was updated successfully, but these errors were encountered: