Skip to content

Conversation

Kordyjan
Copy link
Contributor

Backports #15625

odersky added 3 commits July 26, 2022 17:38
 1. The erasure of an array of matchtypes should sometimes be Object
    instead of Object[]
 2. Classtags of matchtypes can be created only if all alternatives
    produce the same classtag.

About 1: If a matchtype with alternative types A_1, ... A_n is an array element,
it should be treated in the same way as the type ? <: A_1 | ... | A_n. It's an
_unknown_ subtype of A_1 | ... | A_n. That can cause the erasure of the underlying
array to be Object.

Fixes scala#15618
@Kordyjan Kordyjan added this to the 3.2.0 backports milestone Jul 26, 2022
@Kordyjan Kordyjan mentioned this pull request Jul 26, 2022
23 tasks
@Kordyjan Kordyjan merged commit d669b1e into scala:release-3.2.0 Jul 27, 2022
@Kordyjan Kordyjan deleted the backport-15625 branch July 27, 2022 08:21
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