Skip to content

[SUPERSEDED/RESUB] Override check uses useful position#10512

Closed
som-snytt wants to merge 4 commits intoscala:2.13.xfrom
som-snytt:issue/12851-namepos
Closed

[SUPERSEDED/RESUB] Override check uses useful position#10512
som-snytt wants to merge 4 commits intoscala:2.13.xfrom
som-snytt:issue/12851-namepos

Conversation

@som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Aug 25, 2023

No description provided.

@scala-jenkins scala-jenkins added this to the 2.13.13 milestone Aug 25, 2023
@lrytz lrytz force-pushed the issue/12851-namepos branch from bba00d3 to af27905 Compare August 25, 2023 13:00
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.

LGTM, thank you!

@lrytz lrytz modified the milestones: 2.13.13, 2.13.12 Aug 25, 2023
@SethTisue SethTisue added the prio:blocker release blocker (used only by core team, only near release time) label Aug 25, 2023
@SethTisue
Copy link
Member

SethTisue commented Aug 25, 2023

Fixes scala/bug#12851

Does it? It looks to me like you're avoiding the crash, but the spurious warning is still emitted.

(Which is an appropriate ambition level for 2.13.12, but I want to double check our understanding.)

@lrytz
Copy link
Member

lrytz commented Aug 25, 2023

Oh I didn't read carefully, I missed that there's a spurious warning. I'll take a quick look.

@som-snytt som-snytt force-pushed the issue/12851-namepos branch from af27905 to c7fb8a3 Compare August 25, 2023 16:54
@som-snytt
Copy link
Contributor Author

It's not spurious!

trait T1 {
  def f: Int
}
trait T2 {
  def f() = 42
}
class C extends T1 with T2

The warning is at C.

@SethTisue
Copy link
Member

SethTisue commented Aug 25, 2023

Okay, I see that you've now amended the PR to include two different test cases, t12851 (in which T2 extends T1, as in the case in the ticket) and t12851b (in which T2 does not extend T1, but C mixes in both traits).

t12851b makes sense to me.

t12851 still puzzles me. Shouldn't the argument be issued when T2 is compiled, rather than when C is compiled?

@som-snytt som-snytt force-pushed the issue/12851-namepos branch from 854c883 to fa92f17 Compare August 26, 2023 00:40
@som-snytt
Copy link
Contributor Author

som-snytt commented Aug 26, 2023

Added a commit that removes the check file for the test that was moved to pos.

If I had accidentally moved the check to pos, it would have told me!

if (checkFile.exists) genFail("unexpected check file for pos test (use -Werror with neg test to verify warnings)")

Still needs the improvement for valdefs. That came up on an odd ticket so I keep forgetting about it.

@som-snytt som-snytt marked this pull request as ready for review August 26, 2023 07:27
@som-snytt som-snytt marked this pull request as draft August 26, 2023 07:28
@som-snytt som-snytt changed the title Override check uses useful position Override check uses useful position [ci: last-only] Aug 26, 2023
Improve namePos for alias and valdefs.
Handle disjoint interface with Java.
Use namePos for symbol of derived tree.
@som-snytt som-snytt force-pushed the issue/12851-namepos branch from 5e62a7e to c16bfdd Compare August 27, 2023 21:51
@som-snytt
Copy link
Contributor Author

som-snytt commented Aug 27, 2023

Only squashed commits someone may not have yet rebased upon.

@som-snytt som-snytt marked this pull request as ready for review August 27, 2023 22:05
@SethTisue
Copy link
Member

@som-snytt Thanks for doing such a thorough job addressing the underlying issue!

@lrytz Given that we're already in the RC phase (and we don't want to slip the release date by resetting the testing clock unless truly necessary), do you think this is sufficiently safe to merge for 2.13.12, or would it be better to merge #10509 for 2.13.12 and hold this one for 2.13.13...?

@som-snytt
Copy link
Contributor Author

I approved the other PR, as it is of notably smaller scope. It also now comes with a test! which I'm afraid has bloated the PR, sorry!

@SethTisue SethTisue removed the prio:blocker release blocker (used only by core team, only near release time) label Aug 28, 2023
@SethTisue SethTisue modified the milestones: 2.13.12, 2.13.13 Aug 28, 2023
@lrytz lrytz changed the title Override check uses useful position [ci: last-only] Override check uses useful position Aug 28, 2023
@lrytz
Copy link
Member

lrytz commented Aug 28, 2023

Re-submitted in #10520

Except for the namePos change, which is in https://github.com/lrytz/scala/compare/pr10512...lrytz:scala:pr10512a?expand=1

@SethTisue SethTisue removed this from the 2.13.13 milestone Aug 29, 2023
@SethTisue SethTisue closed this Aug 29, 2023
@som-snytt
Copy link
Contributor Author

@lrytz will you handle further uptake of the namePos or whatever? That is, you don't need me to rework something?

@lrytz
Copy link
Member

lrytz commented Aug 29, 2023

Yeah, I'll re-submit the namePos change (for 2.13.13) as a new PR once #10520 is merged.

@som-snytt som-snytt changed the title Override check uses useful position [RESUB] Override check uses useful position Aug 31, 2023
@som-snytt som-snytt changed the title [RESUB] Override check uses useful position [SUPERSEDED/RESUB] Override check uses useful position Mar 11, 2024
@som-snytt som-snytt deleted the issue/12851-namepos branch January 27, 2025 05:15
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