Skip to content

Commit a3b7ed6

Browse files
authored
Merge pull request #11213 from dotty-staging/revert-with
Revert to original indentation syntax
2 parents c413ea2 + 945ff14 commit a3b7ed6

File tree

450 files changed

+1319
-1472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

450 files changed

+1319
-1472
lines changed

community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.junit.{Ignore, Test}
77
import org.junit.Assert.{assertEquals, fail}
88
import org.junit.experimental.categories.Category
99

10-
abstract class CommunityBuildTest with
10+
abstract class CommunityBuildTest:
1111
given CommunityBuildTest = this
1212

1313
/** Depending on the mode of operation, either
@@ -81,7 +81,7 @@ abstract class CommunityBuildTest with
8181
end CommunityBuildTest
8282

8383
@Category(Array(classOf[TestCategory]))
84-
class CommunityBuildTestA extends CommunityBuildTest with
84+
class CommunityBuildTestA extends CommunityBuildTest:
8585
@Test def endpoints4s = projects.endpoints4s.run()
8686
@Test def fansi = projects.fansi.run()
8787
@Test def fastparse = projects.fastparse.run()
@@ -119,7 +119,7 @@ class CommunityBuildTestA extends CommunityBuildTest with
119119
end CommunityBuildTestA
120120

121121
@Category(Array(classOf[TestCategory]))
122-
class CommunityBuildTestB extends CommunityBuildTest with
122+
class CommunityBuildTestB extends CommunityBuildTest:
123123
@Test def algebra = projects.algebra.run()
124124
@Test def betterfiles = projects.betterfiles.run()
125125
@Test def cats = projects.cats.run()

compiler/src/dotty/tools/dotc/Bench.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import scala.annotation.internal.sharable
1111
* number of compilers and run each (sequentially) a given number of times
1212
* on the same sources.
1313
*/
14-
object Bench extends Driver with
14+
object Bench extends Driver:
1515

1616
@sharable private var numRuns = 1
1717

compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object DesugarEnums {
2020
val Simple, Object, Class: Value = Value
2121
}
2222

23-
final case class EnumConstraints(minKind: CaseKind.Value, maxKind: CaseKind.Value, enumCases: List[(Int, RefTree)]) with
23+
final case class EnumConstraints(minKind: CaseKind.Value, maxKind: CaseKind.Value, enumCases: List[(Int, RefTree)]):
2424
require(minKind <= maxKind && !(cached && enumCases.isEmpty))
2525
def requiresCreator = minKind == CaseKind.Simple
2626
def isEnumeration = maxKind < CaseKind.Class

compiler/src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
943943
/** Extractor for not-null assertions.
944944
* A not-null assertion for reference `x` has the form `x.$asInstanceOf$[x.type & T]`.
945945
*/
946-
object AssertNotNull with
946+
object AssertNotNull :
947947
def apply(tree: tpd.Tree, tpnn: Type)(using Context): tpd.Tree =
948948
tree.select(defn.Any_typeCast).appliedToType(AndType(tree.tpe, tpnn))
949949

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ object Trees {
382382
def rhs(using Context): Tree[T] = forceIfLazy
383383
}
384384

385-
trait ValOrTypeDef[-T >: Untyped] extends MemberDef[T] with
385+
trait ValOrTypeDef[-T >: Untyped] extends MemberDef[T]:
386386
type ThisTree[-T >: Untyped] <: ValOrTypeDef[T]
387387

388388
type ParamClause[T >: Untyped] = List[ValDef[T]] | List[TypeDef[T]]
@@ -444,7 +444,7 @@ object Trees {
444444
}
445445

446446
/** The kind of application */
447-
enum ApplyKind with
447+
enum ApplyKind:
448448
case Regular // r.f(x)
449449
case Using // r.f(using x)
450450
case InfixTuple // r f (x1, ..., xN) where N != 1; needs to be treated specially for an error message in typedApply
@@ -1591,12 +1591,12 @@ object Trees {
15911591
}
15921592
}.asInstanceOf[tree.ThisTree[T]]
15931593

1594-
object TypeDefs with
1594+
object TypeDefs:
15951595
def unapply(xs: List[Tree]): Option[List[TypeDef]] = xs match
15961596
case (x: TypeDef) :: _ => Some(xs.asInstanceOf[List[TypeDef]])
15971597
case _ => None
15981598

1599-
object ValDefs with
1599+
object ValDefs:
16001600
def unapply(xs: List[Tree]): Option[List[ValDef]] = xs match
16011601
case Nil => Some(Nil)
16021602
case (x: ValDef) :: _ => Some(xs.asInstanceOf[List[ValDef]])

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,12 +1230,12 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
12301230
Ident(defn.ScalaRuntimeModule.requiredMethod(name).termRef).appliedToTermArgs(args)
12311231

12321232
/** An extractor that pulls out type arguments */
1233-
object MaybePoly with
1233+
object MaybePoly:
12341234
def unapply(tree: Tree): Option[(Tree, List[Tree])] = tree match
12351235
case TypeApply(tree, targs) => Some(tree, targs)
12361236
case _ => Some(tree, Nil)
12371237

1238-
object TypeArgs with
1238+
object TypeArgs:
12391239
def unapply(ts: List[Tree]): Option[List[Tree]] =
12401240
if ts.nonEmpty && ts.head.isType then Some(ts) else None
12411241

compiler/src/dotty/tools/dotc/ast/untpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
155155
}
156156

157157
def WildcardTypeBoundsTree()(using src: SourceFile): TypeBoundsTree = TypeBoundsTree(EmptyTree, EmptyTree, EmptyTree)
158-
object WildcardTypeBoundsTree with
158+
object WildcardTypeBoundsTree:
159159
def unapply(tree: untpd.Tree): Boolean = tree match
160160
case TypeBoundsTree(EmptyTree, EmptyTree, _) => true
161161
case _ => false

compiler/src/dotty/tools/dotc/config/CommandLineParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import java.lang.Character.isWhitespace
66

77
/** A simple enough command line parser.
88
*/
9-
object CommandLineParser with
9+
object CommandLineParser:
1010
inline private val DQ = '"'
1111
inline private val SQ = '\''
1212
inline private val EOF = -1

compiler/src/dotty/tools/dotc/config/Feature.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import util.SrcPos
1010
import SourceVersion._
1111
import reporting.Message
1212

13-
object Feature with
13+
object Feature:
1414

1515
private val dependent = "dependent".toTermName
1616
private val namedTypeArguments = "namedTypeArguments".toTermName

compiler/src/dotty/tools/dotc/config/SourceVersion.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import core.StdNames.nme
88
import core.Decorators.{_, given}
99
import util.Property
1010

11-
enum SourceVersion with
11+
enum SourceVersion:
1212
case `3.0-migration`, `3.0`, `3.1-migration`, `3.1`
1313

1414
val isMigrating: Boolean = toString.endsWith("-migration")
@@ -18,7 +18,7 @@ enum SourceVersion with
1818

1919
def isAtLeast(v: SourceVersion) = stable.ordinal >= v.ordinal
2020

21-
object SourceVersion extends Property.Key[SourceVersion] with
21+
object SourceVersion extends Property.Key[SourceVersion]:
2222
def defaultSourceVersion = `3.0`
2323

2424
val allSourceVersionNames = values.toList.map(_.toString.toTermName)

0 commit comments

Comments
 (0)