Skip to content

Implicit conversion of Array[_] failed #2250

Closed
@liufengyun

Description

@liufengyun

The code compiles in Scalac, but fails in Dotty. Both candidates Predef.genericWrapArray and Predef.genericArrayOps are found, but disqualified due to type inference error.

class T {
  def foo(any: AnyRef): Unit = {
    any.asInstanceOf[Array[_]].iterator
  }
}

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