Skip to content

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Jul 24, 2025

Previously, the AvoidMap used in getPicklableHoleType would try to replace recursive type parameters (obtained via F-bounds) with LazyRefs, which would expand to include another LazyRef, etc. Now we explicitly guard against recursing over already visited TypeRefs, instead replacing them with RecTypes (which are safe to pickle).

Fixes #22996

Previously, the AvoidMap used in getPicklableHoleType would try to
replace recursive type parameters obtained via F-bounds) with LazyRefs,
which would expand to include another LazyRef, etc.
Now we explicitly guard against recursing over already visited TypeRefs,
instead replacing them with RecTypes (which are safe to pickle).
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.

StackOverflowError during pickleQuotes with type parameter T <: SomeTrait[T]
1 participant