Skip to content

Unnecessary lifting of the receiver of a call to a method with varargs #5191

Closed
@allanrenucci

Description

@allanrenucci
object Test {
  implicit class SCOps(ctx: StringContext) {
    def foo(args: String*): String = ""
  }

  def test(sc: StringContext, name: String) = {
    // {
    //   val $1$: Test.SCOps = Test.SCOps(sc)
    //   $1$.foo([ : String]: String*)
    // }
    sc.foo()

    // Test.SCOps(sc).foo([name : String]: String*)
    sc.foo(name)
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions