diff --git a/compiler/test/dotty/tools/repl/ReplCompilerTests.scala b/compiler/test/dotty/tools/repl/ReplCompilerTests.scala index bcb08cd232d7..ecdfeb512e1b 100644 --- a/compiler/test/dotty/tools/repl/ReplCompilerTests.scala +++ b/compiler/test/dotty/tools/repl/ReplCompilerTests.scala @@ -347,6 +347,12 @@ class ReplCompilerTests extends ReplTest: assertEquals("java.lang.AssertionError: assertion failed", all.head) } + @Test def `i13097 expect lambda after colon` = contextually: + assert(ParseResult.isIncomplete("val x = List(42).foreach:")) + + @Test def `i13097 expect template after colon` = contextually: + assert(ParseResult.isIncomplete("class C:")) + object ReplCompilerTests: private val pattern = Pattern.compile("\\r[\\n]?|\\n");