Skip to content

Commit 2867faf

Browse files
committed
Fix #4051: Add regression test
1 parent 2e53688 commit 2867faf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/test/dotty/tools/repl/ReplCompilerTests.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,9 @@ class ReplCompilerTests extends ReplTest {
110110
run("def f(g: => Int): Int = g")
111111
assertTrue(storedOutput().startsWith("def f(g: => Int): Int"))
112112
}
113+
114+
@Test def i4051 = fromInitialState { implicit state =>
115+
run("val x: PartialFunction[Int, Int] = { case x => x } ")
116+
assertEquals("val x: PartialFunction[Int, Int] = <function1>", storedOutput().trim)
117+
}
113118
}

0 commit comments

Comments
 (0)