Skip to content

Backport "Fixes #25947, #11043: Avoid JavaArrayType in synthesized classOf for structural calls" to 3.3 LTS - #1061

Open
tgodzik wants to merge 2 commits into
backport-lts-3.3-26256from
backport-lts-3.3-26028
Open

Backport "Fixes #25947, #11043: Avoid JavaArrayType in synthesized classOf for structural calls" to 3.3 LTS#1061
tgodzik wants to merge 2 commits into
backport-lts-3.3-26256from
backport-lts-3.3-26028

Conversation

@tgodzik

@tgodzik tgodzik commented Aug 6, 2026

Copy link
Copy Markdown

Backports scala#26028 to the 3.3.9.

PR submitted by the release tooling.

@tgodzik
tgodzik force-pushed the backport-lts-3.3-26028 branch 4 times, most recently from 35e57ce to e7da0a8 Compare August 7, 2026 15:49
@tgodzik
tgodzik force-pushed the backport-lts-3.3-26256 branch from da12e75 to 890ee2f Compare August 7, 2026 15:55
soronpo and others added 2 commits August 7, 2026 17:56
…assOf for structural calls (scala#26028)

When a structural method has an `Array[T]` parameter, `Dynamic`
synthesized the runtime `applyDynamic` call with
`clsOf(JavaArrayType(T))` for the parameter-class array. `JavaArrayType`
is not a Scala source type and has no TASTy encoding, so the pickler
crashed with a `MatchError` on the class-literal constant.

Convert `JavaArrayType(T)` back to the Scala `Array[T]` form before
passing it to `clsOf`. The two forms re-erase to the same JVM array
class, so the runtime reflective lookup is unchanged.

Fixes scala#25947 scala#11043

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

Extensively, but it's a small fix.

## How was the solution tested?

New automated tests (including the issue's reproducer, if applicable)

---------

Co-authored-by: Claude <noreply@anthropic.com>
[Cherry-picked 4a99a48]
@tgodzik
tgodzik force-pushed the backport-lts-3.3-26028 branch from e7da0a8 to 944d825 Compare August 7, 2026 15:56
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