I have the following value class definition:

```
final class Box[A](val value: A) extends AnyVal
```

If I try to create a `trait`

like this, it works just fine:

```
import cats.Functor
implicit def functor: Functor[Box] =
new Functor[Box] {
def map[A, B](fa: Box[A])(f: A => B): Box[B] =
new Box(f(fa.value))
}
```

Unfortunately the following fails with a nasty compiler error:

```
// Fails!
final class BoxFunctor extends Functor[Box] {
def map[A, B](fa: Box[A])(f: A => B): Box[B] =
new Box(f(fa.value))
}
```

And this too fails with a compiler error:

```
implicit def functor: Functor[Box] =
// Fails here!
new BoxFunctor {}
// This seems fine, but we can't instantiate it in any way :-(
trait BoxFunctor extends Functor[Box] {
def map[A, B](fa: Box[A])(f: A => B): Box[B] =
new Box(f(fa.value))
}
```

The error looks like this:

```
[error] Box.scala:33:11: bridge generated for member method map: [A, B](fa: .Box[A], f: A => B).Box[B] in trait BoxFunctor
[error] which overrides method map: [A, B](fa: F[A], f: A => B)F[B] in trait Functor
[error] clashes with definition of the member itself;
[error] both have erased type (fa: Object, f: Function1)Object
[error] new BoxFunctor {}
[error] ^
```

So I don’t understand it …

Why does it work with anonymous classes (e.g. `new Functor[Box] {}`

) and why does it fail as soon as I give that class implementation a name?

Any way to workaround it?