Closed
Description
Compiler version
All Scala 3.3+ versions
Minimized code
class Test:
def test(name: String)(body: => Unit) = ???
def check(element: Any)(expected: String): Unit = ???
test("byte arrays"):
check {
???
}{
"""foo
|bar""".stripMargin
}
// required additional line
Output
class Test:
def test(name: String)(body: => Unit) = ???
def check(element: Any)(expected: String): Unit = ???
test("byte arrays"):
check {
???
}:
"""foo
|bar""".stripMargin
// required additional line
[error] ./test.scala:10:14
[error] end of statement expected but '.' found
[error] |bar""".stripMargin
[error] ^
[error] ./test.scala:6:5
[error] missing argument list for method check in class Test
[error]
[error] def check(element: Any)(expected: String): Unit
Expectation
Should either not rewrite that expression or compiler should be able to parse it