Skip to content

Fix match type bounds checking problem #23695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2025

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Aug 8, 2025

No description provided.

@odersky odersky merged commit 22f0f6c into scala:main Aug 8, 2025
46 checks passed
@odersky odersky deleted the fix-matchalias-boundscheck branch August 8, 2025 15:23
natsukagami added a commit to natsukagami/dotty that referenced this pull request Aug 11, 2025
@WojciechMazur WojciechMazur added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Aug 12, 2025
@WojciechMazur WojciechMazur added this to the 3.7.3 milestone Aug 12, 2025
WojciechMazur added a commit that referenced this pull request Aug 13, 2025
Backports #23695 to the 3.7.3-RC2.

PR submitted by the release tooling.
@WojciechMazur WojciechMazur added backport:done This PR was successfully backported. and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Aug 13, 2025
natsukagami added a commit to natsukagami/dotty that referenced this pull request Aug 15, 2025
hamzaremmal added a commit that referenced this pull request Aug 16, 2025
<!--
- **Add capture checking to boundary and NonLocalReturns**
- **Add capture-checking test for boundary**
- **Patch DropBreaks to correctly detect boundary blocks**
- **Add capture checking to CommandLineParser**
- **Add capture checking to scala.util**
- **Add capture checking to scala.runtime**
- **Add capture checking to rest of scala.runtime (except
TupledFunctions)**
- **Add capture checking to IArray**
- **[TODO INVESTIGATE] IArray: `Array[AnyRef^{xs*}]` not working, revert
cast**
- **Add capture checking to various scala.* base package files**
- **[TODO FIX] Temporarily drop upper bound of higher-kinded type `F` in
tuple match types**
- **Add capture checking to scala.reflect**
- **[TODO REMOVE] Add TODO list**
- **[TODO EXPLAIN] Add capture checking to Mirror and TupleMirror**
- **Add capture checking to scala.caps**
- **Add capture checking to compiletime.Ops**
- **Add capture checking to stdLibPatches**
- **Add capture checking to annotations**
- **Attempt to capture-check quotes**
- **Track sun.misc.Unsafe in LazyVal implementation**
- **Require Conversion to be pure**
-->

## List of changes

- Capture checking enabled for all files except listed in the next
section
- `boundary` is now capture-checked, preventing `Label` from being
leaked outside of its corresponding `boundary`. Requires #23507.
- `

## Files missing capture checking 

- [ ] `Tuple.scala`, waiting for #23695 to reach the next base version
- [ ] `Mirror.scala`, which requires auto-generated Mirrors to be
compatible with extending one of the `caps.Capability` subtraits.
Currently the plan is to simply ban case classes.

---------

Co-authored-by: Hamza Remmal <hamza@remmal.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:done This PR was successfully backported.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants