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

Regression in kubukoz/spotify-next - incorrect implicit parameter clause warning leading to an illegal rewrite #22598

Closed
jchyb opened this issue Feb 13, 2025 · 3 comments
Assignees
Labels
area:implicits related to implicits area:reporting Error reporting including formatting, implicit suggestions, etc area:rewriting tool itype:bug regression This worked in a previous version but doesn't anymore

Comments

@jchyb
Copy link
Contributor

jchyb commented Feb 13, 2025

https://github.com/VirtusLab/community-build3/actions/runs/13209505213/job/36881104947

Compiler version

Broken: 3.7.0-RC1-bin-20250207-d60a914-NIGHTLY

Minimized code

class A

def bodyText(implicit a: A, default: String = "") = ???

def doBeforeRetry(implicit a: A) =
  bodyText

Output

[warn] ./minim.scala:6:11
[warn] Implicit parameters should be provided with a `using` clause.
[warn] This code can be rewritten automatically under -rewrite -source 3.7-migration.
[warn] To disable the warning, please use the following option: 
[warn]   "-Wconf:msg=Implicit parameters should be provided with a `using` clause:s"
[warn]   bodyText
[warn]      

Compiling with --rewrite --source:3.7-migration will lead to an incorrect code being generated:

class A

def bodyText(implicit a: A, default: String = "") = ???

def doBeforeRetry(implicit a: A) =
  bodyTextusing 

Expectation

No warning and no rewrite

@jchyb jchyb added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Feb 13, 2025
@hamzaremmal
Copy link
Member

hamzaremmal commented Feb 13, 2025

Duplicate of #22567

@hamzaremmal hamzaremmal marked this as a duplicate of #22517 Feb 13, 2025
@hamzaremmal hamzaremmal marked this as a duplicate of #22567 Feb 13, 2025
@hamzaremmal hamzaremmal self-assigned this Feb 13, 2025
@jchyb
Copy link
Contributor Author

jchyb commented Feb 13, 2025

Bisect script points to b0628d1 (does not look all that much related, but maybe this will help)

@Gedochao Gedochao added area:rewriting tool area:implicits related to implicits area:reporting Error reporting including formatting, implicit suggestions, etc regression This worked in a previous version but doesn't anymore and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Feb 14, 2025
@Gedochao
Copy link
Contributor

Was resolved together with #22567
Closing it.
cc @hamzaremmal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:implicits related to implicits area:reporting Error reporting including formatting, implicit suggestions, etc area:rewriting tool itype:bug regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

No branches or pull requests

3 participants