Skip to content

Commit c32dda1

Browse files
committed
Extra test
1 parent 6b6e38b commit c32dda1

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tests/neg/i22589c.check

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- Error: tests/neg/i22589c.scala:8:7 ----------------------------------------------------------------------------------
2+
8 |object A extends Base[A.P] { // error
3+
|^
4+
|Cannot infer the implementation of the deferred given instance given_TC_T in trait Base
5+
|since the result is self-recursive. An implementing given needs to be written explicitly.
6+
9 | case class P()
7+
10 |}

tests/neg/i22589c.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
trait TC[T]
3+
4+
trait Base[T] {
5+
given TC[T] = scala.compiletime.deferred
6+
}
7+
8+
object A extends Base[A.P] { // error
9+
case class P()
10+
}

0 commit comments

Comments
 (0)