I tried to encode the information that a `BinaryTree`

ADT will have an element with `scala.math.Ordering`

instance in scope in this post.

```
enum BinaryTree[+A : Ordering]:
case Leaf extends BinaryTree[Nothing]
case Node[T : Ordering](left: BinaryTree[T], value: T, right: BinaryTree[T]) extends BinaryTree[T]
```

I wrote a function to transform the binary tree by replacing the left node with a leaf node.

```
import scala.math.Ordering
def doSomething[A](tree: BinaryTree[A]): BinaryTree[A] =
import BinaryTree._
tree match
case Leaf => Leaf
case a@Node(_, _, _) => a.copy(left = Leaf)
```

Now the compiler gives this error message

```
[error] 22 | case a@Node(_, _, _) => a.copy(left = Leaf)
[error] | ^
[error] |No implicit Ordering defined for T$1
[error] |
[error] |where: T$1 is a type in method doSomething with bounds <: A
[error] |..
[error] |I found:
[error] |
[error] | math.Ordering.ordered[A](
[error] | {
[error] | def $anonfun(x: T$1): Comparable[? >: T$1] = int2Integer(x)
[error] | closure($anonfun)
[error] | }
[error] | )
[error] |
[error] |But method int2Integer in object Predef does not match type math.Ordering.AsComparable[A].
```

Why is it trying to prove that `A`

has an `Ordering`

instance when that is proved by the existence of the `BInaryTree[A]`

method parameter?