-
Notifications
You must be signed in to change notification settings - Fork 14
2.13 regression in @tailrec + singleton types #467
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
Milestone
Comments
The change here is not just a nuisance but a regression since, as the error message says, tail call optimization isn't done any more. |
Agreed. I'm on it. |
Cool, thanks Miles. |
2m
added a commit
to akka/akka
that referenced
this issue
Mar 7, 2018
Until scala/scala-dev#467 is fixed and released
jrudolph
added a commit
to jrudolph/akka-http
that referenced
this issue
Mar 8, 2018
This is due to scala/scala-dev#467. This might lead to stack overflows, so don't merge but wait for a fix in the next version.
jrudolph
added a commit
to jrudolph/akka-http
that referenced
this issue
Mar 8, 2018
This is due to scala/scala-dev#467. This might lead to stack overflows, so don't merge but wait for a fix in the next version.
milessabin
added a commit
to milessabin/scala
that referenced
this issue
Mar 13, 2018
At one point the literal types PR modified the semantics of asInstanceOf to check for equality of the target value with the value embedded in the singleton type. This interacted badly with mkAttributedCastHack in Tailcalls, dotta@c2534bf because the inserted casts could end up referring to a non-existent Symbol which would be needed to implement the equality check during Erasure. The fix at the time was to make the use of a singleton type as a method argument or result type disqualify the method from having the tailcall optimization applied. A later decision by the SIP committee decided for unrelated reasons that an asInstanceOf test should not perform an equality check, so this disqualification became unnecessary. It was not removed, however. This came to light because singleton types are used as method argument and result types in methods which are expected to have the tail call optimizatino applied, resulting in, scala/scala-dev#467 We fix that here by doing what should have been done earlier: removing the disqualification.
Fixed in scala/scala#6420. |
adriaanm
pushed a commit
to scala/scala
that referenced
this issue
Apr 11, 2018
Singleton typed args/results don't interfere with tailcalls At one point the literal types PR modified the semantics of asInstanceOf to check for equality of the target value with the value embedded in the singleton type. This interacted badly with mkAttributedCastHack in Tailcalls, dotta@c2534bf because the inserted casts could end up referring to a non-existent Symbol which would be needed to implement the equality check during Erasure. The fix at the time was to make the use of a singleton type as a method argument or result type disqualify the method from having the tailcall optimization applied. A later decision by the SIP committee decided for unrelated reasons that an asInstanceOf test should not perform an equality check, so this disqualification became unnecessary. It was not removed, however. This came to light because singleton types are used as method argument and result types in methods which are expected to have the tail call optimizatino applied, resulting in, scala/scala-dev#467 We fix that here by doing what should have been done earlier: removing the disqualification.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
at e.g. https://scala-ci.typesafe.com/view/scala-2.13.x/job/scala-2.13.x-integrate-community-build/919/consoleFull we see:
@milessabin since it involves singleton types, I'm tentatively assigning this to you for investigation.
The text was updated successfully, but these errors were encountered: