Skip to content

Commit 18a5789

Browse files
authored
Merge pull request #6954 from dotty-staging/fix-#6716
Fix #6716: Add test
2 parents 8cced32 + 840def7 commit 18a5789

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/pos/i6716.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
trait Monad[T]
2+
class Foo
3+
object Foo {
4+
given as Monad[Foo]
5+
}
6+
7+
opaque type Bar = Foo
8+
object Bar {
9+
given as Monad[Bar] = the[Monad[Foo]]
10+
}
11+
12+
object Test {
13+
val mf = the[Monad[Foo]]
14+
val mb = the[Monad[Bar]]
15+
}

0 commit comments

Comments
 (0)