Skip to content

Conversation

tgodzik
Copy link

@tgodzik tgodzik commented Jul 23, 2025

Backports scala#23515 to the 3.3.7.

PR submitted by the release tooling.
[skip ci]

odersky and others added 2 commits July 23, 2025 15:05
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.

[Cherry-picked 9704b0c][modified]
@tgodzik tgodzik closed this Jul 24, 2025
@tgodzik tgodzik deleted the backport-lts-3.3-23515 branch July 24, 2025 12:43
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