Thanks for the pointer. I traced this through to better understand the process.

By way of example, in:

```scala
scala> val ls = List[Option[Any]]()
ls: List[Option[Any]] = List()

scala> ls.flatten
```

The undetermined type params from the outer context are `B(in method flatten)`, during the implicit search for the implicit parameter of type `Option[Any] => scala.collection.GenTraversableOnce[B]`.

That is first used to approximate the sought type as `Option[Any] => scala.collection.GenTraversableOnce[?]` (`wildPt`) which is used to prune the candidate implicits.

Later, when typechecking the plausible candidates, occurrences of the undet params are replaced by type variables in the expected type, and `matchesPt` is called to see if the candidate is suitable:

```
itree2 = {
  ((xo: Option[Any]) => scala.this.Option.option2Iterable[Any](xo))
}: Option[Any] => Iterable[Any]

matchesPt(
  tp = Option[Any] => Iterable[Any],
  pt = Option[Any] => scala.collection.GenTraversableOnce[?B]
  undet = [type B]
)
```

What does `matchesPt` do with the `undet`? Ultimately, they are used in `isApplicableToMethod`:

```scala
      def typesCompatible(args: List[Type]) = undetparams match {
        case Nil => isCompatibleArgs(args, formals) && isWeaklyCompatible(mt resultType args, pt)
        case _   => tryInstantiating(args)
      }

      def tryInstantiating(args: List[Type]) = falseIfNoInstance {
        val restpe = mt resultType args
        val AdjustedTypeArgs.Undets(okparams, okargs, leftUndet) = methTypeArgs(undetparams, formals, restpe, args, pt)
        val restpeInst = restpe.instantiateTypeParams(okparams, okargs)
```