Skip to content

faulty rewrite implicit parameter with using clause #23112

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

Closed
lenguyenthanh opened this issue May 6, 2025 · 2 comments
Closed

faulty rewrite implicit parameter with using clause #23112

lenguyenthanh opened this issue May 6, 2025 · 2 comments

Comments

@lenguyenthanh
Copy link

Compiler version

3.7.0

Cannot trigger rewrite with 3.7.1-RC1 and 3.nightly

Minimized code

//> using scala 3.7.0
//> using options -rewrite -source:3.7-migration -indent

object Main:

  def hh(implicit str: String): String = summon[String]

  hh:
    "hello world"

Output

//> using scala 3.7.0
//> using options -rewrite -source:3.7-migration -indent

object Main:

  def hh(implicit str: String): String = summon[String]

  hh:
    using "hello world"

Expectation

should rewrite to working version

@lenguyenthanh lenguyenthanh added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels May 6, 2025
@som-snytt
Copy link
Contributor

Duplicates the canonical ticket #22731

The PR has a thorough test, though it doesn't do exactly "an arg that is not a function".

@som-snytt
Copy link
Contributor

som-snytt commented May 6, 2025

Verified that head does not patch.

It may deserve a "known issue" in the 3.7.0 release notes. I don't know where to check for that.

@som-snytt som-snytt added stat:duplicate and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants