Skip to content

Fix #9346: Add fallback on lazy ref cycles #9546

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

Closed
wants to merge 3 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Aug 13, 2020

findMember of RefinedTypes had a fallback to safe_& in the case of cyclic references.
It also needs to handle the case where a LazyRef depends on itself during evaluation.
This fixes #9346 for normal compiles. Unpickling needs another fix in Variances.scala.

findMember of RefinedTypes had a fallback to safe_& in the case of cyclic references.
It also needs to handle the case where a LazyRef depends on itself during evaluation.
This fixes scala#9346 for normal compiles. Unpickling needs another fix in Variances.scala.
It turns out that now that we know that cyclic evaluations of LazyRefs can happen
in normal code, we can just use a CyclicReference for them. There's no need to label
this case with a different exception.
@smarter
Copy link
Member

smarter commented Aug 13, 2020

Unfortunately with this change akka-streams goes into an infinite loop, here's the stacktrace which involves interspersed nested calls to recoverable_& and LazyRef#ref: https://gist.github.com/smarter/fbed5375cc79f3f5688d05ad4378c6c4

@odersky odersky marked this pull request as draft August 14, 2020 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

F-bounded type member definition crashes the compiler
2 participants