Skip to content

Commit

Permalink
Add another test for comma before nested outdents
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Mar 22, 2024
1 parent 613218f commit b866e87
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,22 @@ class SignificantIndentationSuite extends BaseDottySuite {
runTestAssert[Stat](code, layout)(tree)
}

test("#3542 apply with optional braces in intermediate arg, with multiple outdents") {
val code =
"""|A(
| foo = x =>
| x match
| case baz => baz,
| bar = bar
|)
|""".stripMargin
val error =
"""|<input>:4: error: `;` expected but `,` found
| case baz => baz,
| ^""".stripMargin
runTestError[Stat](code, error)
}

test("indented-double-apply") {
runTestAssert[Stat](
"""|def method =
Expand Down

0 comments on commit b866e87

Please sign in to comment.