diff --git a/scalafmt-tests/src/test/resources/scala3/OptionalBraces.stat b/scalafmt-tests/src/test/resources/scala3/OptionalBraces.stat index f87578ff7c..a963b4f9e3 100644 --- a/scalafmt-tests/src/test/resources/scala3/OptionalBraces.stat +++ b/scalafmt-tests/src/test/resources/scala3/OptionalBraces.stat @@ -6608,7 +6608,7 @@ object a { /** c1 */ def quux = ??? } -<<< SKIP #4133 try-catch with trailing comments 6, insert end markers +<<< #4133 try-catch with trailing comments 6, insert end markers rewrite.scala3.insertEndMarkerMinLines = 2 === object a: @@ -6621,22 +6621,17 @@ object a: quux end foo >>> -test does not parse: [dialect scala3] expected template body object a: - ^ -def foo = - try bar - catch case baz => qux -====== full result: ====== -object a: -def foo = - try bar - catch case baz => qux - end try + def foo = + try bar + catch + case baz => + qux - // c1 - quux -end foo + // c1 + end try + quux + end foo <<< #4133 enclosed new anonymous with comments and added end marker rewrite.scala3 { convertToNewSyntax = true diff --git a/scalafmt-tests/src/test/resources/scala3/OptionalBraces_fold.stat b/scalafmt-tests/src/test/resources/scala3/OptionalBraces_fold.stat index 96f1017c2f..7f68ea1b4f 100644 --- a/scalafmt-tests/src/test/resources/scala3/OptionalBraces_fold.stat +++ b/scalafmt-tests/src/test/resources/scala3/OptionalBraces_fold.stat @@ -6341,7 +6341,7 @@ object a { /** c1 */ def quux = ??? } -<<< SKIP #4133 try-catch with trailing comments 6, insert end markers +<<< #4133 try-catch with trailing comments 6, insert end markers rewrite.scala3.insertEndMarkerMinLines = 2 === object a: @@ -6354,22 +6354,17 @@ object a: quux end foo >>> -test does not parse: [dialect scala3] expected template body object a: - ^ -def foo = - try bar - catch case baz => qux -====== full result: ====== -object a: -def foo = - try bar - catch case baz => qux - end try + def foo = + try bar + catch + case baz => + qux - // c1 - quux -end foo + // c1 + end try + quux + end foo <<< #4133 enclosed new anonymous with comments and added end marker rewrite.scala3 { convertToNewSyntax = true diff --git a/scalafmt-tests/src/test/resources/scala3/OptionalBraces_keep.stat b/scalafmt-tests/src/test/resources/scala3/OptionalBraces_keep.stat index 8c55cfea36..e3ce49cdf5 100644 --- a/scalafmt-tests/src/test/resources/scala3/OptionalBraces_keep.stat +++ b/scalafmt-tests/src/test/resources/scala3/OptionalBraces_keep.stat @@ -6632,7 +6632,7 @@ object a { /** c1 */ def quux = ??? } -<<< SKIP #4133 try-catch with trailing comments 6, insert end markers +<<< #4133 try-catch with trailing comments 6, insert end markers rewrite.scala3.insertEndMarkerMinLines = 2 === object a: @@ -6645,23 +6645,18 @@ object a: quux end foo >>> -test does not parse: [dialect scala3] expected template body object a: - ^ -def foo = - try - bar -====== full result: ====== -object a: -def foo = - try - bar - catch case baz => qux - end try + def foo = + try + bar + catch + case baz => + qux - // c1 - quux -end foo + // c1 + end try + quux + end foo <<< #4133 enclosed new anonymous with comments and added end marker rewrite.scala3 { convertToNewSyntax = true diff --git a/scalafmt-tests/src/test/resources/scala3/OptionalBraces_unfold.stat b/scalafmt-tests/src/test/resources/scala3/OptionalBraces_unfold.stat index 2e62680d41..0c2b51c0c7 100644 --- a/scalafmt-tests/src/test/resources/scala3/OptionalBraces_unfold.stat +++ b/scalafmt-tests/src/test/resources/scala3/OptionalBraces_unfold.stat @@ -6808,7 +6808,7 @@ object a { /** c1 */ def quux = ??? } -<<< SKIP #4133 try-catch with trailing comments 6, insert end markers +<<< #4133 try-catch with trailing comments 6, insert end markers rewrite.scala3.insertEndMarkerMinLines = 2 === object a: @@ -6821,25 +6821,18 @@ object a: quux end foo >>> -test does not parse: [dialect scala3] expected template body object a: - ^ -def foo = - try - bar -====== full result: ====== -object a: -def foo = - try - bar - catch - case baz => - qux - end try + def foo = + try + bar + catch + case baz => + qux - // c1 - quux -end foo + // c1 + end try + quux + end foo <<< #4133 enclosed new anonymous with comments and added end marker rewrite.scala3 { convertToNewSyntax = true