Skip to content

Fix SAM conversion crash on @VarArgs trait method#26141

Open
nox213 wants to merge 2 commits into
scala:mainfrom
nox213:fix-i25600
Open

Fix SAM conversion crash on @VarArgs trait method#26141
nox213 wants to merge 2 commits into
scala:mainfrom
nox213:fix-i25600

Conversation

@nox213
Copy link
Copy Markdown
Contributor

@nox213 nox213 commented May 22, 2026

Fixes #25600

The varargs forwarder is synthesized with the Deferred flag, which makes the code below crash since possibleSamMethods returns two methods:

// from ExpandSams.scala
val Seq(samDenot) = tpe1.possibleSamMethods

This PR removes Deferred flag when synthesizes varargs forwarder.

How much have you relied on LLM-based tools in this contribution?

Extensively, for finding root cause

How was the solution tested?

reproducer

@nox213 nox213 changed the title Fix i25600 Fix SAM conversion crash on @VarArgs trait method May 22, 2026
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.

crash when implementing varargs trait

1 participant