Skip to content

Generalize warnings for top-level calls to Any or AnyRef methods#20312

Merged
odersky merged 3 commits intoscala:mainfrom
mbovel:mb/17493-2
May 1, 2024
Merged

Generalize warnings for top-level calls to Any or AnyRef methods#20312
odersky merged 3 commits intoscala:mainfrom
mbovel:mb/17493-2

Conversation

@mbovel
Copy link
Copy Markdown
Member

@mbovel mbovel commented May 1, 2024

751cc2f is a more direct way to fix #17493 than #20301.

7a9102a further generalizes checkAnyRefMethodCall, as suggested by @odersky.

mbovel and others added 2 commits May 1, 2024 12:02
Co-Authored-By: Yoonjae Jeon <18438185+nox213@users.noreply.github.com>
Comment thread tests/warn/i17493.scala Outdated
Co-authored-by: Sébastien Doeraene <sjrdoeraene@gmail.com>
@odersky odersky enabled auto-merge May 1, 2024 15:32
@odersky odersky merged commit 9348ae7 into scala:main May 1, 2024
@mbovel mbovel deleted the mb/17493-2 branch May 1, 2024 17:28
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
WojciechMazur added a commit that referenced this pull request Jul 6, 2024
…thods" to LTS (#21091)

Backports #20312 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
SolalPirelli pushed a commit that referenced this pull request Apr 27, 2026
…s top-level resolution (#20717)

Fixes #20651 

Also tweak the message text to express Odersky's formulation of the
rule.

```
Universal method synchronized does not resolve to the enclosing class
```

Follow-up to #20312
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.

Missing error on synchronized from value class

4 participants