Skip to content

Align with Scala 3: Add -Xsource-features:double-definitions to warn or error for double definitions #10846

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 16, 2024

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Aug 16, 2024

Optionally warn or error for double definitions that went undetected in Scala 2.

The new condition is a source feature, so it warns under -Xsource:3 and errors under -Xsource-features:double-definitions. It is also available under -Xsource-features:v2.13.15.

This is for "user convenience": fixing the bug outright would require users to change code that is probably benign.

Revises the earlier #10727

@scala-jenkins scala-jenkins added this to the 2.13.16 milestone Aug 16, 2024
@som-snytt som-snytt modified the milestones: 2.13.16, 2.13.15 Aug 16, 2024
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Aug 16, 2024
@lrytz lrytz force-pushed the issue/i20006-mitigate branch from 7f21589 to 25c521f Compare August 16, 2024 07:46
Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you! I extended the migration warning a little to include a reference to the conflicting sym.

@lrytz lrytz enabled auto-merge August 16, 2024 07:47
@lrytz lrytz merged commit 4867f45 into scala:2.13.x Aug 16, 2024
2 of 3 checks passed
@som-snytt som-snytt deleted the issue/i20006-mitigate branch August 16, 2024 11:45
@SethTisue SethTisue changed the title -Xsource-features:double-definitions Align with Scala 3: Add -Xsource-features:double-definitions to warn or error for double definitions Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants