diff --git a/tests/pos/i6716.scala b/tests/pos/i6716.scala new file mode 100644 index 000000000000..12a4903d2a7c --- /dev/null +++ b/tests/pos/i6716.scala @@ -0,0 +1,15 @@ +trait Monad[T] +class Foo +object Foo { + given as Monad[Foo] +} + +opaque type Bar = Foo +object Bar { + given as Monad[Bar] = the[Monad[Foo]] +} + +object Test { + val mf = the[Monad[Foo]] + val mb = the[Monad[Bar]] +} \ No newline at end of file