Skip to content
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

Avoid spurious ambiguity warning with inherited overloaded symbols #10513

Merged
merged 1 commit into from Aug 28, 2023

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Aug 25, 2023

Follow-up for #10321 (which is a follow-up for #10220)

Fixes scala/bug#12850

@scala-jenkins scala-jenkins added this to the 2.13.13 milestone Aug 25, 2023
@lrytz lrytz modified the milestones: 2.13.13, 2.13.12 Aug 25, 2023
@lrytz lrytz requested a review from som-snytt August 25, 2023 12:17
@SethTisue SethTisue added the prio:hi high priority (used only by core team, only near release time) label Aug 25, 2023
Copy link
Member

@SethTisue SethTisue left a comment

Choose a reason for hiding this comment

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

this is primarily a "I'm okay with this going into 2.13.12" review. as in "we don't need to reset the community testing clock". let's still see what Som says

Copy link
Contributor

@som-snytt som-snytt left a comment

Choose a reason for hiding this comment

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

Small suggestion, as intersect is heavyweight.

I started looking for other problematic comparisons; I expected them everywhere. One may be in nextDefinition, where memberType is overload-aware, then we test last == defSym.

src/compiler/scala/tools/nsc/typechecker/Contexts.scala Outdated Show resolved Hide resolved
@som-snytt
Copy link
Contributor

Maybe there will be a follow-up in 2.13.13.

It would be nice to have sym.isDistinctFrom(other). Still better than sym.filter(other.alternatives.contains) == NoSymbol. I did not know sym.suchThat asserts that the result is not overloaded.

@lrytz lrytz merged commit 6cbff91 into scala:2.13.x Aug 28, 2023
3 checks passed
@SethTisue SethTisue removed the prio:hi high priority (used only by core team, only near release time) label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants