Skip to content

inline def is not inlined when it has two parameter lists, one with a repeated parameter and one with a default parameter #4172

Closed
@smarter

Description

@smarter

This is a very weird combination that I haven't been able to reduce further:

object Test {
  inline def foo(first: Int*)(second: String = "") = {}

  def test = {
    foo(1)()
  }
}

The body of test after typer is:

        {
          val first$1: Int* = [1 : Int]: Int*
          Test.foo(first$1)(Test.foo$default$2(first$1))
        }

Notice that foo hasn't been inlined away.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions