diff --git a/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces.stat b/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces.stat index 1cb8693fa..82b4a718d 100644 --- a/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces.stat +++ b/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces.stat @@ -7519,3 +7519,13 @@ val bar: Int => Pf = >>> val bar: Int => Pf = case msg: Int => msg + 1 +<<< #4133 braceless in `match` with a semicolon between cases +tag match + case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect => + node.refPrivate = in0.readByte() == PRIVATE; + case _ => +>>> +tag match + case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect => + node.refPrivate = in0.readByte() == PRIVATE; + case _ => diff --git a/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_fold.stat b/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_fold.stat index 73d3db914..8b0714636 100644 --- a/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_fold.stat +++ b/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_fold.stat @@ -7233,3 +7233,18 @@ val bar: Int => Pf = >>> val bar: Int => Pf = case msg: Int => msg + 1 +<<< #4133 braceless in `match` with a semicolon between cases +tag match + case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect => + node.refPrivate = in0.readByte() == PRIVATE; + case _ => +>>> +test does not parse: [dialect scala3] `outdent` expected but `case` found +tag match + case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect => + node.refPrivate = in0.readByte() == PRIVATE; case _ => + ^ +====== full result: ====== +tag match + case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect => + node.refPrivate = in0.readByte() == PRIVATE; case _ => diff --git a/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_keep.stat b/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_keep.stat index de6e009c8..34d5fca5b 100644 --- a/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_keep.stat +++ b/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_keep.stat @@ -7548,3 +7548,13 @@ val bar: Int => Pf = >>> val bar: Int => Pf = case msg: Int => msg + 1 +<<< #4133 braceless in `match` with a semicolon between cases +tag match + case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect => + node.refPrivate = in0.readByte() == PRIVATE; + case _ => +>>> +tag match + case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect => + node.refPrivate = in0.readByte() == PRIVATE; + case _ => diff --git a/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_unfold.stat b/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_unfold.stat index cbc418600..b7602ab5a 100644 --- a/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_unfold.stat +++ b/scalafmt-tests/shared/src/test/resources/scala3/OptionalBraces_unfold.stat @@ -7828,3 +7828,13 @@ val bar: Int => Pf = val bar: Int => Pf = case msg: Int => msg + 1 +<<< #4133 braceless `match` with a semicolon between cases +tag match + case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect => + node.refPrivate = in0.readByte() == PRIVATE; + case _ => +>>> +tag match + case TYPEREFsymbol | TYPEREFdirect | TERMREFsymbol | TERMREFdirect => + node.refPrivate = in0.readByte() == PRIVATE; + case _ => diff --git a/scalafmt-tests/shared/src/test/scala/org/scalafmt/FormatTests.scala b/scalafmt-tests/shared/src/test/scala/org/scalafmt/FormatTests.scala index 7ff27886f..a38123b17 100644 --- a/scalafmt-tests/shared/src/test/scala/org/scalafmt/FormatTests.scala +++ b/scalafmt-tests/shared/src/test/scala/org/scalafmt/FormatTests.scala @@ -137,7 +137,7 @@ class FormatTests extends FunSuite with CanRunTests with FormatAssertions { val explored = Debug.explored.get() logger.debug(s"Total explored: $explored") if (!onlyUnit && !onlyManual) - assertEquals(explored, 1497775, "total explored") + assertEquals(explored, 1497994, "total explored") val results = debugResults.result() // TODO(olafur) don't block printing out test results. // I don't want to deal with scalaz's Tasks :'(