From 39aacad1f21e0e09498489c93c7089927992ff34 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Tue, 8 Nov 2022 13:29:40 +0100 Subject: [PATCH] feature: Allow fewer braces for Scala 3.3.x Follow up from https://github.com/lampepfl/dotty/pull/16297 --- .../shared/src/main/scala/scala/meta/dialects/package.scala | 4 +++- .../scala/meta/tests/parsers/dotty/FewerBracesSuite.scala | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scalameta/dialects/shared/src/main/scala/scala/meta/dialects/package.scala b/scalameta/dialects/shared/src/main/scala/scala/meta/dialects/package.scala index 1d852f3a1c..7aef007af6 100644 --- a/scalameta/dialects/shared/src/main/scala/scala/meta/dialects/package.scala +++ b/scalameta/dialects/shared/src/main/scala/scala/meta/dialects/package.scala @@ -150,7 +150,9 @@ package object dialects { implicit val Scala32 = Scala31 - implicit val Scala3 = Scala32 + implicit val Scala33 = Scala31.withAllowFewerBraces(true) + + implicit val Scala3 = Scala33 implicit val Scala3Future = Scala3 .withAllowUnderscoreAsTypePlaceholder(true) diff --git a/tests/shared/src/test/scala/scala/meta/tests/parsers/dotty/FewerBracesSuite.scala b/tests/shared/src/test/scala/scala/meta/tests/parsers/dotty/FewerBracesSuite.scala index 9edefd4e78..c9446aaf0d 100644 --- a/tests/shared/src/test/scala/scala/meta/tests/parsers/dotty/FewerBracesSuite.scala +++ b/tests/shared/src/test/scala/scala/meta/tests/parsers/dotty/FewerBracesSuite.scala @@ -4,8 +4,6 @@ import scala.meta._ class FewerBracesSuite extends BaseDottySuite { - protected override implicit val dialect = dialects.Scala3.withAllowFewerBraces(true) - test("simple") { runTestAssert[Stat]( """|val firstLine = files.get(fileName).fold: