Skip to content

Commit 6e17c0e

Browse files
authored
Detabulate files (#20055)
Apologies for whitespace delta. Replace some stray tabs with spaces. Mostly resist tweaking syntax.
2 parents 0a3497b + 3c06b77 commit 6e17c0e

13 files changed

+37
-37
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
11051105
case AndType(ref, nn1) if qual.tpe eq ref =>
11061106
qual.tpe.widen match
11071107
case OrNull(nn2) if nn1 eq nn2 =>
1108-
Some(qual)
1108+
Some(qual)
11091109
case _ => None
11101110
case _ => None
11111111
case _ => None

compiler/src/dotty/tools/dotc/core/Flags.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ object Flags {
137137
def flagStrings(privateWithin: String = ""): Seq[String] = {
138138
var rawStrings = (2 to MaxFlag).flatMap(x.flagString(_)) // DOTTY problem: cannot drop with (_)
139139
if (!privateWithin.isEmpty && !x.is(Protected))
140-
rawStrings = rawStrings :+ "private"
140+
rawStrings :+= "private"
141141
val scopeStr = if (x.is(Local)) "this" else privateWithin
142142
if (scopeStr != "")
143143
rawStrings.filter(_ != "<local>").map {

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ object SymDenotations {
772772
* This can mean one of two things:
773773
* - the method and class are defined in a structural given instance, or
774774
* - the class is an implicit class and the method is its implicit conversion.
775-
*/
775+
*/
776776
final def isCoDefinedGiven(cls: Symbol)(using Context): Boolean =
777777
is(Method) && isOneOf(GivenOrImplicit)
778778
&& ( is(Synthetic) // previous scheme used in 3.0
@@ -1071,8 +1071,8 @@ object SymDenotations {
10711071
*/
10721072
final def moduleClass(using Context): Symbol = {
10731073
def notFound = {
1074-
if (Config.showCompletions) println(s"missing module class for $name: $myInfo")
1075-
NoSymbol
1074+
if (Config.showCompletions) println(s"missing module class for $name: $myInfo")
1075+
NoSymbol
10761076
}
10771077
if (this.is(ModuleVal))
10781078
myInfo match {

compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ object SymbolLoaders {
221221
Stats.record("package scopes")
222222

223223
/** The scope of a package. This is different from a normal scope
224-
* in that names of scope entries are kept in mangled form.
225-
*/
224+
* in that names of scope entries are kept in mangled form.
225+
*/
226226
final class PackageScope extends MutableScope(0) {
227227
override def newScopeEntry(name: Name, sym: Symbol)(using Context): ScopeEntry =
228228
super.newScopeEntry(name.mangled, sym)

compiler/src/dotty/tools/dotc/core/Types.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ object Types extends TypeUtils {
13401340
*
13411341
* For instance, if `A` is an unconstrained type variable, then
13421342
*
1343-
* ArrayBuffer[Int] | ArrayBuffer[A]
1343+
* ArrayBuffer[Int] | ArrayBuffer[A]
13441344
*
13451345
* is approximated by constraining `A` to be =:= to `Int` and returning `ArrayBuffer[Int]`
13461346
* instead of `ArrayBuffer[? >: Int | A <: Int & A]`
@@ -3488,7 +3488,7 @@ object Types extends TypeUtils {
34883488
private var myFactorCount = 0
34893489
override def andFactorCount =
34903490
if myFactorCount == 0 then
3491-
myFactorCount = tp1.andFactorCount + tp2.andFactorCount
3491+
myFactorCount = tp1.andFactorCount + tp2.andFactorCount
34923492
myFactorCount
34933493

34943494
def derivedAndType(tp1: Type, tp2: Type)(using Context): Type =
@@ -3766,7 +3766,7 @@ object Types extends TypeUtils {
37663766
* LambdaType | TermLambda | TypeLambda
37673767
* -------------+-------------------+------------------
37683768
* HKLambda | HKTermLambda | HKTypeLambda
3769-
* MethodOrPoly | MethodType | PolyType
3769+
* MethodOrPoly | MethodType | PolyType
37703770
*/
37713771
trait LambdaType extends BindingType with TermType { self =>
37723772
type ThisName <: Name

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
478478
if isWildcardStarArg(tree) then
479479
expr match
480480
case Ident(nme.WILDCARD_STAR) =>
481-
// `_*` is used as a wildcard name to indicate a vararg splice pattern;
482-
// avoid the double `*` in this case.
483-
toText(expr)
481+
// `_*` is used as a wildcard name to indicate a vararg splice pattern;
482+
// avoid the double `*` in this case.
483+
toText(expr)
484484
case _ =>
485485
toText(expr) ~ "*"
486486
else

compiler/src/dotty/tools/dotc/transform/Bridges.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class Bridges(root: ClassSymbol, thisPhase: DenotTransformer)(using Context) {
2626

2727
override def isSubParent(parent: Symbol, bc: Symbol)(using Context) =
2828
true
29-
// Never consider a bridge if there is a superclass that would contain it
30-
// See run/t2857.scala for a test that would break with a VerifyError otherwise.
29+
// Never consider a bridge if there is a superclass that would contain it
30+
// See run/t2857.scala for a test that would break with a VerifyError otherwise.
3131

3232
/** Only use the superclass of `root` as a parent class. This means
3333
* overriding pairs that have a common implementation in a trait parent

compiler/src/dotty/tools/dotc/transform/Erasure.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,9 @@ object Erasure {
594594

595595
def erasedDef(sym: Symbol)(using Context): Tree =
596596
if sym.isClass then
597-
// We cannot simply drop erased classes, since then they would not generate classfiles
598-
// and would not be visible under separate compilation. So we transform them to
599-
// empty interfaces instead.
597+
// We cannot simply drop erased classes, since then they would not generate classfiles
598+
// and would not be visible under separate compilation. So we transform them to
599+
// empty interfaces instead.
600600
tpd.ClassDef(sym.asClass, DefDef(sym.primaryConstructor.asTerm), Nil)
601601
else
602602
if sym.owner.isClass then sym.dropAfter(erasurePhase)
@@ -667,7 +667,7 @@ object Erasure {
667667
*/
668668
override def typedSelect(tree: untpd.Select, pt: Type)(using Context): Tree = {
669669
if tree.name == nme.apply && integrateSelect(tree) then
670-
return typed(tree.qualifier, pt)
670+
return typed(tree.qualifier, pt)
671671

672672
val qual1 = typed(tree.qualifier, AnySelectionProto)
673673

compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala

+6-6
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,12 @@ object ExplicitOuter {
352352
case _ =>
353353
// Need to be careful to dealias before erasure, otherwise we lose prefixes.
354354
atPhaseNoLater(erasurePhase)(outerPrefix(tpe.underlying))
355-
// underlying is fine here and below since we are calling this after erasure.
356-
// However, there is some weird stuff going on with parboiled2 where an
357-
// AppliedType with a type alias as constructor is fed to outerPrefix.
358-
// For some other unknown reason this works with underlying but not with superType.
359-
// I was not able to minimize the problem and parboiled2 spits out way too much
360-
// macro generated code to be able to pinpoint the root problem.
355+
// underlying is fine here and below since we are calling this after erasure.
356+
// However, there is some weird stuff going on with parboiled2 where an
357+
// AppliedType with a type alias as constructor is fed to outerPrefix.
358+
// For some other unknown reason this works with underlying but not with superType.
359+
// I was not able to minimize the problem and parboiled2 spits out way too much
360+
// macro generated code to be able to pinpoint the root problem.
361361
}
362362
case tpe: TypeProxy =>
363363
outerPrefix(tpe.underlying)

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
328328
else
329329
tree
330330
def app1 =
331-
// reverse order of transforming args and fun. This way, we get a chance to see other
332-
// well-formedness errors before reporting errors in possible inferred type args of fun.
331+
// reverse order of transforming args and fun. This way, we get a chance to see other
332+
// well-formedness errors before reporting errors in possible inferred type args of fun.
333333
val args1 = transform(app.args)
334334
cpy.Apply(app)(transform(app.fun), args1)
335335
methPart(app) match

compiler/src/dotty/tools/dotc/typer/Applications.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1359,8 +1359,8 @@ trait Applications extends Compatibility {
13591359
|| ctx.reporter.hasErrors
13601360
then result
13611361
else notAnExtractor(result)
1362-
// It might be that the result of typedExpr is an `apply` selection or implicit conversion.
1363-
// Reject in this case.
1362+
// It might be that the result of typedExpr is an `apply` selection or implicit conversion.
1363+
// Reject in this case.
13641364

13651365
def tryWithTypeArgs(qual: untpd.Tree, targs: List[Tree])(fallBack: (Tree, TyperState) => Tree): Tree =
13661366
tryEither {

compiler/src/dotty/tools/dotc/typer/Implicits.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ object Implicits:
411411
/** Search mode to use for possibly avoiding looping givens */
412412
enum SearchMode:
413413
case Old, // up to 3.3, old mode w/o protection
414-
CompareWarn, // from 3.4, old mode, warn if new mode would change result
415-
CompareErr, // from 3.5, old mode, error if new mode would change result
416-
New // from future, new mode where looping givens are avoided
414+
CompareWarn, // from 3.4, old mode, warn if new mode would change result
415+
CompareErr, // from 3.5, old mode, error if new mode would change result
416+
New // from future, new mode where looping givens are avoided
417417

418418
/** The result of an implicit search */
419419
sealed abstract class SearchResult extends Showable {

compiler/src/dotty/tools/dotc/typer/Typer.scala

+5-5
Original file line numberDiff line numberDiff line change
@@ -922,9 +922,9 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
922922
import untpd.*
923923
var templ1 = templ
924924
def isEligible(tp: Type) =
925-
tp.exists
926-
&& !tp.typeSymbol.is(Final)
927-
&& (!tp.isTopType || tp.isAnyRef) // Object is the only toplevel class that can be instantiated
925+
tp.exists
926+
&& !tp.typeSymbol.is(Final)
927+
&& (!tp.isTopType || tp.isAnyRef) // Object is the only toplevel class that can be instantiated
928928
if (templ1.parents.isEmpty &&
929929
isFullyDefined(pt, ForceDegree.flipBottom) &&
930930
isSkolemFree(pt) &&
@@ -3002,7 +3002,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
30023002

30033003
/** Translate infix operation expression `l op r` to
30043004
*
3005-
* l.op(r) if `op` is left-associative
3005+
* l.op(r) if `op` is left-associative
30063006
* { val x = l; r.op(x) } if `op` is right-associative call-by-value and `l` is impure, and not in a quote pattern
30073007
* r.op(l) if `op` is right-associative call-by-name, or `l` is pure, or in a quote pattern
30083008
*
@@ -4377,7 +4377,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
43774377
case poly: PolyType
43784378
if !(ctx.mode is Mode.Type) && dummyTreeOfType.unapply(tree).isEmpty =>
43794379
// If we are in a conversion from a TermRef with polymorphic underlying
4380-
// type, give up. In this case the typed `null` literal cannot be instantiated.
4380+
// type, give up. In this case the typed `null` literal cannot be instantiated.
43814381
// Test case was but i18695.scala, but it got fixed by a different tweak in #18719.
43824382
// We leave test for this condition in as a defensive measure in case
43834383
// it arises somewhere else.

0 commit comments

Comments
 (0)