Skip to content

Drop some unnecessary given wrappers around extension methods #19269

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
Dec 14, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 14, 2023

The compiler codebase contains several extension methods in

given AnyRef with

where this is not really necessary. We can just import the extension methods directly, in particular if there is only one extension method after with. That makes it clearer.

It's good to eliminate these things aggressively, since otherwise newcomers will tend to imitate the idiom without understanding what it serves for.

@sjrd sjrd enabled auto-merge December 14, 2023 15:00
@sjrd sjrd merged commit 59eddae into scala:main Dec 14, 2023
@sjrd sjrd deleted the refactor-given-wrappers branch December 14, 2023 15:05
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
WojciechMazur added a commit that referenced this pull request Jun 26, 2024
…ds" to LTS (#20800)

Backports #19269 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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.

3 participants