Skip to content

Do not emit a SYNCHRONIZED method for Outer.this.synchronized calls - #26998

Merged
SolalPirelli merged 3 commits into
scala:mainfrom
dotty-staging:solal/outer-synchronized
Sep 8, 2026
Merged

SolalPirelli merged 3 commits into
scala:mainfrom
dotty-staging:solal/outer-synchronized

Conversation

@SolalPirelli

@SolalPirelli SolalPirelli commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Reported by @natsukagami offline. Regression from #26697

Have you relied on LLM-based tools in this contribution?

No

How was the solution tested?

New automated tests (including the issue's reproducer, if applicable)

@SolalPirelli SolalPirelli added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Sep 7, 2026
@SolalPirelli SolalPirelli added this to the 3.10.0 milestone Sep 7, 2026
Comment thread tests/run/outer-synchronized.scala Resolved
@SolalPirelli
SolalPirelli force-pushed the solal/outer-synchronized branch from 3156a78 to 6e5a4a1 Compare September 8, 2026 09:02
tailrec-synchronized.scala
tailrec.scala
traitParams.scala
outer-synchronized.scala

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

cc @anatoliykmetyuk the new test checks that some methods are transformed from an explicit synchronized call to a synchronized method, it seems scoverage breaks that transformation, presumably because it inserts counters before or after the synchronized block

@SolalPirelli
SolalPirelli marked this pull request as ready for review September 8, 2026 13:18

@natsukagami natsukagami left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me

@SolalPirelli
SolalPirelli merged commit 07fb189 into scala:main Sep 8, 2026
64 checks passed
@SolalPirelli
SolalPirelli deleted the solal/outer-synchronized branch September 8, 2026 13:29
@WojciechMazur WojciechMazur added backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Sep 8, 2026
WojciechMazur added a commit that referenced this pull request Sep 9, 2026
…zed` calls" to 3.10.0 (#27018)

Backports #26998 to the 3.10.0-RC2.

PR submitted by the release tooling.
[skip ci]
@WojciechMazur WojciechMazur added backport:done This PR was successfully backported. and removed backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" labels Sep 9, 2026
alexarchambault pushed a commit to plasmon-scala/scala3 that referenced this pull request Nov 4, 2026
…scala#26998)

Reported by @natsukagami offline. Regression from scala#26697

## Have you relied on LLM-based tools in this contribution?

No

## How was the solution tested?

New automated tests (including the issue's reproducer, if applicable)
[Cherry-picked 07fb189][modified]
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