Skip to content

Commit 4385c39

Browse files
authored
Merge pull request #6852 from dotty-staging/fix-#6847
Fix #6847: Add regression test
2 parents fcd4315 + e1a18b5 commit 4385c39

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/pos/i6847.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
trait Syntax[F[_]] {
2+
def (a: A) ret[A]: F[A]
3+
}
4+
5+
trait Instance[A]
6+
7+
implicit val instanceSyntax: Syntax[Instance] = new Syntax[Instance] {
8+
def (a: A) ret[A]: Instance[A] = new Instance[A] {}
9+
}
10+
11+
object Instance {
12+
def defer[A](a: => A): Instance[A] = {
13+
().ret
14+
new Instance[A] {}
15+
}
16+
}

0 commit comments

Comments
 (0)