Skip to content

Commit 7e7aa50

Browse files
committed
Detabulate files
[Cherry-picked 3c06b77][modified]
1 parent f3129fc commit 7e7aa50

12 files changed

+34
-34
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
10581058
case AndType(ref, nn1) if qual.tpe eq ref =>
10591059
qual.tpe.widen match
10601060
case OrNull(nn2) if nn1 eq nn2 =>
1061-
Some(qual)
1061+
Some(qual)
10621062
case _ => None
10631063
case _ => None
10641064
case _ => None

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ object SymDenotations {
771771
* This can mean one of two things:
772772
* - the method and class are defined in a structural given instance, or
773773
* - the class is an implicit class and the method is its implicit conversion.
774-
*/
774+
*/
775775
final def isCoDefinedGiven(cls: Symbol)(using Context): Boolean =
776776
is(Method) && isOneOf(GivenOrImplicit)
777777
&& ( is(Synthetic) // previous scheme used in 3.0
@@ -1067,8 +1067,8 @@ object SymDenotations {
10671067
*/
10681068
final def moduleClass(using Context): Symbol = {
10691069
def notFound = {
1070-
if (Config.showCompletions) println(s"missing module class for $name: $myInfo")
1071-
NoSymbol
1070+
if (Config.showCompletions) println(s"missing module class for $name: $myInfo")
1071+
NoSymbol
10721072
}
10731073
if (this.is(ModuleVal))
10741074
myInfo match {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ object SymbolLoaders {
216216
Stats.record("package scopes")
217217

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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ object Types extends TypeUtils {
13101310
*
13111311
* For instance, if `A` is an unconstrained type variable, then
13121312
*
1313-
* ArrayBuffer[Int] | ArrayBuffer[A]
1313+
* ArrayBuffer[Int] | ArrayBuffer[A]
13141314
*
13151315
* is approximated by constraining `A` to be =:= to `Int` and returning `ArrayBuffer[Int]`
13161316
* instead of `ArrayBuffer[? >: Int | A <: Int & A]`
@@ -3375,7 +3375,7 @@ object Types extends TypeUtils {
33753375
private var myFactorCount = 0
33763376
override def andFactorCount =
33773377
if myFactorCount == 0 then
3378-
myFactorCount = tp1.andFactorCount + tp2.andFactorCount
3378+
myFactorCount = tp1.andFactorCount + tp2.andFactorCount
33793379
myFactorCount
33803380

33813381
def derivedAndType(tp1: Type, tp2: Type)(using Context): Type =
@@ -3650,7 +3650,7 @@ object Types extends TypeUtils {
36503650
* LambdaType | TermLambda | TypeLambda
36513651
* -------------+-------------------+------------------
36523652
* HKLambda | HKTermLambda | HKTypeLambda
3653-
* MethodOrPoly | MethodType | PolyType
3653+
* MethodOrPoly | MethodType | PolyType
36543654
*/
36553655
trait LambdaType extends BindingType with TermType { self =>
36563656
type ThisName <: Name

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
470470
if isWildcardStarArg(tree) then
471471
expr match
472472
case Ident(nme.WILDCARD_STAR) =>
473-
// `_*` is used as a wildcard name to indicate a vararg splice pattern;
474-
// avoid the double `*` in this case.
475-
toText(expr)
473+
// `_*` is used as a wildcard name to indicate a vararg splice pattern;
474+
// avoid the double `*` in this case.
475+
toText(expr)
476476
case _ =>
477477
toText(expr) ~ "*"
478478
else

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,9 @@ object Erasure {
591591

592592
def erasedDef(sym: Symbol)(using Context): Tree =
593593
if sym.isClass then
594-
// We cannot simply drop erased classes, since then they would not generate classfiles
595-
// and would not be visible under separate compilation. So we transform them to
596-
// empty interfaces instead.
594+
// We cannot simply drop erased classes, since then they would not generate classfiles
595+
// and would not be visible under separate compilation. So we transform them to
596+
// empty interfaces instead.
597597
tpd.ClassDef(sym.asClass, DefDef(sym.primaryConstructor.asTerm), Nil)
598598
else
599599
if sym.owner.isClass then sym.dropAfter(erasurePhase)
@@ -664,7 +664,7 @@ object Erasure {
664664
*/
665665
override def typedSelect(tree: untpd.Select, pt: Type)(using Context): Tree = {
666666
if tree.name == nme.apply && integrateSelect(tree) then
667-
return typed(tree.qualifier, pt)
667+
return typed(tree.qualifier, pt)
668668

669669
val qual1 = typed(tree.qualifier, AnySelectionProto)
670670

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

Lines changed: 6 additions & 6 deletions
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
319319
else
320320
tree
321321
def app1 =
322-
// reverse order of transforming args and fun. This way, we get a chance to see other
323-
// well-formedness errors before reporting errors in possible inferred type args of fun.
322+
// reverse order of transforming args and fun. This way, we get a chance to see other
323+
// well-formedness errors before reporting errors in possible inferred type args of fun.
324324
val args1 = transform(app.args)
325325
cpy.Apply(app)(transform(app.fun), args1)
326326
methPart(app) match

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,8 +1341,8 @@ trait Applications extends Compatibility {
13411341
|| ctx.reporter.hasErrors
13421342
then result
13431343
else notAnExtractor(result)
1344-
// It might be that the result of typedExpr is an `apply` selection or implicit conversion.
1345-
// Reject in this case.
1344+
// It might be that the result of typedExpr is an `apply` selection or implicit conversion.
1345+
// Reject in this case.
13461346

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

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,9 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
900900
import untpd.*
901901
var templ1 = templ
902902
def isEligible(tp: Type) =
903-
tp.exists
904-
&& !tp.typeSymbol.is(Final)
905-
&& (!tp.isTopType || tp.isAnyRef) // Object is the only toplevel class that can be instantiated
903+
tp.exists
904+
&& !tp.typeSymbol.is(Final)
905+
&& (!tp.isTopType || tp.isAnyRef) // Object is the only toplevel class that can be instantiated
906906
if (templ1.parents.isEmpty &&
907907
isFullyDefined(pt, ForceDegree.flipBottom) &&
908908
isSkolemFree(pt) &&
@@ -2936,7 +2936,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
29362936

29372937
/** Translate infix operation expression `l op r` to
29382938
*
2939-
* l.op(r) if `op` is left-associative
2939+
* l.op(r) if `op` is left-associative
29402940
* { val x = l; r.op(x) } if `op` is right-associative call-by-value and `l` is impure, and not in a quote pattern
29412941
* r.op(l) if `op` is right-associative call-by-name, or `l` is pure, or in a quote pattern
29422942
*
@@ -4310,7 +4310,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
43104310
case poly: PolyType
43114311
if !(ctx.mode is Mode.Type) && dummyTreeOfType.unapply(tree).isEmpty =>
43124312
// If we are in a conversion from a TermRef with polymorphic underlying
4313-
// type, give up. In this case the typed `null` literal cannot be instantiated.
4313+
// type, give up. In this case the typed `null` literal cannot be instantiated.
43144314
// Test case was but i18695.scala, but it got fixed by a different tweak in #18719.
43154315
// We leave test for this condition in as a defensive measure in case
43164316
// it arises somewhere else.

0 commit comments

Comments
 (0)