Skip to content

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

Closed
@jchyb

Description

@jchyb

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

Metadata

Metadata

Assignees

Labels

area:implicitsrelated to implicitsarea:reportingError reporting including formatting, implicit suggestions, etcarea:rewriting toolitype:bugregressionThis worked in a previous version but doesn't anymore

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions