Skip to content

Add a compiler quick fix for "Implicit parameters should be provided with a using clause" #23071

Closed
@unkarjedy

Description

@unkarjedy
Contributor

Scala 3.7.0-RC4

This code:

def foo()(implicit x: Int): String = ???

def main(): Unit = {
  foo()(42)
  foo()(42)
  foo()(42)
}

Generates warning:

Implicit parameters should be provided with a `using` clause.
This code can be rewritten automatically under -rewrite -source 3.7-migration.
To disable the warning, please use the following option:
"-Wconf:msg=Implicit parameters should be provided with a `using` clause:s"
Image

It would be nice if the compiler could provide the compiler fix for the warning.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @tgodzik@unkarjedy@Gedochao@WojciechMazur

    Issue actions

      Add a compiler quick fix for "Implicit parameters should be provided with a `using` clause" · Issue #23071 · scala/scala3