Skip to content

Commit 005ad50

Browse files
committed
Test for divergence checking
1 parent 555cafa commit 005ad50

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

compiler/src/dotty/tools/dotc/config/Printers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object Printers {
1717
val checks: Printer = noPrinter
1818
val config: Printer = noPrinter
1919
val cyclicErrors: Printer = noPrinter
20-
val debug = noPrinter // no type annotion here to force inlining
20+
val debug = noPrinter // no type annotation here to force inlining
2121
val derive: Printer = noPrinter
2222
val dottydoc: Printer = noPrinter
2323
val exhaustivity: Printer = noPrinter

tests/run/implied-divergence.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Checks that divergence checking works before going into
2+
// recursions.
3+
case class E(x: E | Null)
4+
5+
implied e for E(null)
6+
7+
object Test extends App {
8+
9+
implied f given (e: E) for E(e)
10+
11+
assert(the[E].toString == "E(E(null))")
12+
13+
}

0 commit comments

Comments
 (0)