Skip to content

Conversation

@som-snytt
Copy link
Contributor

In typer, self-invocation may be nested in a block due to named arg rewrite. Check the result expr for a forward self-invocation.

In ForwardDepChecks, the rhs of the ctor def
may be an expr (not a block) due to a forwarder
created by ElimRepeated. That means prepareStats
is not called before checking the Apply and there
is no current LevelInfo.

For checking, that forwarder gets a synthetic span.

Fixes #24249

In typer, self-invocation may be nested in a block
due to named arg rewrite. Check the result expr for
a forward self-invocation.

In ForwardDepChecks, the rhs of the ctor def
may be an expr (not a block) due to a forwarder
created by ElimRepeated. That means prepareStats
is not called before checking the Apply and there
is no current LevelInfo.

For checking, that forwarder gets a synthetic span.
@som-snytt som-snytt marked this pull request as ready for review November 5, 2025 06:15
@Gedochao Gedochao requested a review from mbovel November 5, 2025 08:36
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.

scala.annotation.varargs doesn't work on constructors

2 participants