Skip to content

Method clash for AnyVal #10082

@scabug

Description

@scabug

It seems to be a variant of #8702

https://scalafiddle.io/sf/Qm1ynvP/13

case class A[T](private val v: AnyRef) extends AnyVal

class B[T, U] extends (T => A[U]) {
  override def apply(k: T): A[U] = ???
}

ScalaFiddle.scala:6: error: bridge generated for member method apply: (k: T)ScalaFiddle.A[U] in class B
which overrides method apply: (v1: T1)R in trait Function1
clashes with definition of the member itself;
both have erased type (v1: Object)Object
    override def apply(k: T): A[U] = ???

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions