Skip to content

Overloading Resolution + Vararg methods: example should be ambiguous #8344

@scabug

Description

@scabug

Related to #4728. This compiles, the second alternative is chosen

object t {
  def f(x: Object) = 1
  def f(x: String*) = 2
}
t.f("") // returns 2, should be ambiguous.

According to #4728, it should be ambiguous. I assume the compiler thinks that String* conforms to Object. Maybe because it tests if Seq[String] conforms to Object, not sure.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions