It also appears to work if you only change pairItBad
like I described in my previous answer. I can’t really say why your version doesn’t work though, especially since it seems to work with dotty. The strangest part is that I just read somewhere that the kind of existentials that require importing scala.language.existentials will be removed in dotty, but they appear to work better in dotty in this piece of code.