Skip to content

Use dealiasKeepRefiningAnnots in AvoidMap - #25609

Merged
mbovel merged 1 commit into
scala:mainfrom
dotty-staging:mb/annot-refining-avoid
Mar 24, 2026
Merged

Use dealiasKeepRefiningAnnots in AvoidMap#25609
mbovel merged 1 commit into
scala:mainfrom
dotty-staging:mb/annot-refining-avoid

Conversation

@mbovel

@mbovel mbovel commented Mar 24, 2026

Copy link
Copy Markdown
Member

No description provided.

@mbovel
mbovel marked this pull request as ready for review March 24, 2026 15:13
â€Ķtions

When a local val escapes its block scope, the AvoidMap widens its type.
Previously, `dealias` stripped all annotations including refining ones,
losing type information. Use `dealiasKeepRefiningAnnots` instead so
that refining annotations (like @qualified) are preserved in the
widened type.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mbovel
mbovel force-pushed the mb/annot-refining-avoid branch from 92fa1de to 23c7a5e Compare March 24, 2026 17:57
@mbovel
mbovel enabled auto-merge (squash) March 24, 2026 17:59
@mbovel
mbovel merged commit 8540004 into scala:main Mar 24, 2026
64 checks passed
@mbovel
mbovel deleted the mb/annot-refining-avoid branch March 24, 2026 19:40
@WojciechMazur WojciechMazur added this to the 3.8.4 milestone Mar 31, 2026
tgodzik pushed a commit to scala/scala3-lts that referenced this pull request Apr 8, 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.

4 participants