Skip to content

Support cleanup actions in class completers #23515

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 13, 2025

Needed to break the loop between completion of class and companion object. If we try to complete the class first, and completion needs the companion object (for instance for processing an import) then the companion object completion would consult the companion class info for constructor that need a constructor proxy in the object. This can lead to a cyclic reference.

We now break the cycle by delaying adding constructor proxies in this case to be the last completion action of the companion class.

Needed to break the loop between completion of class and companion object.
If we try to complete the class first, and completion needs the companion
object (for instance for processing an import) then the companion object
completion would consult the companion class info for constructor that
need a constructor proxy in the object. This can lead to a cyclic reference.

We now break the cycle by delaying adding constructor proxies in this case
to be the last completion action of the companion class.
@odersky odersky requested a review from mbovel July 13, 2025 13:12
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.

2 participants