Open mpilquist opened 2 years ago
I managed to minimize it to two files:
//1.scala
package one
trait Parsers[P[+_]]
object Reference extends Parsers[Reference.Parser]:
opaque type Parser[+A] = Int
def jsonParser[P[+_]](p: Parsers[P]): Unit = ???
//2.scala
import one.*
def test =
jsonParser(Reference)
Compiler version
3.1.0-RC2 and 3.0.2
Minimized code
I have not yet successfully minimized, but it likely involves a pattern like this:
To reproduce:
git clone https://github.com/fpinscala/fpinscala
git checkout 96a31e98ec40cd70718f2948224c993561266c65
sbt ";project answers; console"
Changing
opaque type Parser[+A] = Location => Result[A]
totype Parser[+A] = Location => Result[A]
avoids the issue.Output (click arrow to expand)