Skip to content

Commit d4a8600

Browse files
Remove trailing whitespace (#17202)
Cleanup for the issue stated in #17196
2 parents b0ad1e1 + e1ab97e commit d4a8600

File tree

31 files changed

+59
-59
lines changed

31 files changed

+59
-59
lines changed

.github/PULL_REQUEST_TEMPLATE/fix-issue.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ assignees: ''
66

77
---
88

9-
<!--
10-
TODO first sign the CLA
9+
<!--
10+
TODO first sign the CLA
1111
https://www.lightbend.com/contribute/cla/scala
1212
-->
1313

1414
## Fix #XYZ
1515

16-
<!-- TODO description of the change -->
16+
<!-- TODO description of the change -->
1717

1818

1919
<!-- Ideally should have a called "Fix #XYZ: A SHORT FIX DESCRIPTION" -->

.github/PULL_REQUEST_TEMPLATE/other-pr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ assignees: ''
66

77
---
88

9-
<!--
10-
TODO first sign the CLA
9+
<!--
10+
TODO first sign the CLA
1111
https://www.lightbend.com/contribute/cla/scala
1212
-->
1313

1414
## Description
1515

16-
<!-- TODO description of the change -->
16+
<!-- TODO description of the change -->
1717

1818

1919
<!-- Ideally should have a single commit -->

.github/workflows/releases.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
options: --cpu-shares 4096
1414

1515
env:
16-
SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }}
16+
SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }}
1717
SDKMAN_TOKEN: ${{ secrets.SDKMAN_TOKEN }}
18-
18+
1919
steps:
2020
- name: Reset existing repo
2121
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true

.github/workflows/scripts/publish-sdkman.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
set -u
1111

12-
# latest stable dotty version
12+
# latest stable dotty version
1313
DOTTY_VERSION=$(curl -s https://api.github.com/repos/lampepfl/dotty/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
1414
DOTTY_URL="https://github.com/lampepfl/dotty/releases/download/$DOTTY_VERSION/scala3-$DOTTY_VERSION.zip"
1515

16-
# checking if dotty version is available
16+
# checking if dotty version is available
1717
if ! curl --output /dev/null --silent --head --fail "$DOTTY_URL"; then
1818
echo "URL doesn't exist: $DOTTY_URL"
1919
exit 1

bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccess.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class InitializedAccess {
1818

1919
@Setup
2020
def prepare: Unit = {
21-
holder = new LazyHolder
21+
holder = new LazyHolder
2222
holder.value
2323
}
2424

bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessAny.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class InitializedAccessAny {
1818

1919
@Setup
2020
def prepare: Unit = {
21-
holder = new LazyAnyHolder
21+
holder = new LazyAnyHolder
2222
holder.value
2323
}
2424

bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessGeneric.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class InitializedAccessGeneric {
1818

1919
@Setup
2020
def prepare: Unit = {
21-
holder = new LazyGenericHolder[String]("foo")
21+
holder = new LazyGenericHolder[String]("foo")
2222
holder.value
2323
}
2424

bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/InitializedAccessString.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class InitializedAccessString {
1818

1919
@Setup
2020
def prepare: Unit = {
21-
holder = new LazyStringHolder
21+
holder = new LazyStringHolder
2222
holder.value
2323
}
2424

bench-micro/src/main/scala/dotty/tools/benchmarks/lazyvals/LazyVals.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ object LazyVals {
2121
}
2222
}
2323
}
24-
24+
2525
class LazyHolder {
2626

2727
lazy val value: List[Int] = {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Compiler {
8989
new ExplicitOuter, // Add accessors to outer classes from nested ones.
9090
new ExplicitSelf, // Make references to non-trivial self types explicit as casts
9191
new StringInterpolatorOpt, // Optimizes raw and s and f string interpolators by rewriting them to string concatenations or formats
92-
new DropBreaks) :: // Optimize local Break throws by rewriting them
92+
new DropBreaks) :: // Optimize local Break throws by rewriting them
9393
List(new PruneErasedDefs, // Drop erased definitions from scopes and simplify erased expressions
9494
new UninitializedDefs, // Replaces `compiletime.uninitialized` by `_`
9595
new InlinePatterns, // Remove placeholders of inlined patterns

compiler/src/dotty/tools/dotc/cc/Setup.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ extends tpd.TreeTraverser:
262262
// hard-coded expansion since $throws aliases in stdlib are defined with `?=>` rather than `?->`
263263
defn.FunctionOf(
264264
AnnotatedType(
265-
defn.CanThrowClass.typeRef.appliedTo(exc),
265+
defn.CanThrowClass.typeRef.appliedTo(exc),
266266
Annotation(defn.ErasedParamAnnot, defn.CanThrowClass.span)) :: Nil,
267267
res,
268268
isContextual = true

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ object Annotations {
194194
object Annotation {
195195

196196
def apply(tree: Tree): ConcreteAnnotation = ConcreteAnnotation(tree)
197-
197+
198198
def apply(cls: ClassSymbol, span: Span)(using Context): Annotation =
199199
apply(cls, Nil, span)
200200

@@ -206,7 +206,7 @@ object Annotations {
206206

207207
def apply(atp: Type, arg: Tree, span: Span)(using Context): Annotation =
208208
apply(atp, arg :: Nil, span)
209-
209+
210210
def apply(atp: Type, args: List[Tree], span: Span)(using Context): Annotation =
211211
apply(New(atp, args).withSpan(span))
212212

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3129,8 +3129,8 @@ object Parsers {
31293129
/* -------- PARAMETERS ------------------------------------------- */
31303130

31313131
/** DefParamClauses ::= DefParamClause { DefParamClause } -- and two DefTypeParamClause cannot be adjacent
3132-
* DefParamClause ::= DefTypeParamClause
3133-
* | DefTermParamClause
3132+
* DefParamClause ::= DefTypeParamClause
3133+
* | DefTermParamClause
31343134
* | UsingParamClause
31353135
*/
31363136
def typeOrTermParamClauses(
@@ -3228,7 +3228,7 @@ object Parsers {
32283228
* UsingClsTermParamClause::= ‘(’ ‘using’ [‘erased’] (ClsParams | ContextTypes) ‘)’
32293229
* ClsParams ::= ClsParam {‘,’ ClsParam}
32303230
* ClsParam ::= {Annotation}
3231-
*
3231+
*
32323232
* TypelessClause ::= DefTermParamClause
32333233
* | UsingParamClause
32343234
*
@@ -3616,13 +3616,13 @@ object Parsers {
36163616
}
36173617
}
36183618

3619-
3619+
36203620

36213621
/** DefDef ::= DefSig [‘:’ Type] ‘=’ Expr
36223622
* | this TypelessClauses [DefImplicitClause] `=' ConstrExpr
36233623
* DefDcl ::= DefSig `:' Type
36243624
* DefSig ::= id [DefTypeParamClause] DefTermParamClauses
3625-
*
3625+
*
36263626
* if clauseInterleaving is enabled:
36273627
* DefSig ::= id [DefParamClauses] [DefImplicitClause]
36283628
*/
@@ -3661,8 +3661,8 @@ object Parsers {
36613661
val mods1 = addFlag(mods, Method)
36623662
val ident = termIdent()
36633663
var name = ident.name.asTermName
3664-
val paramss =
3665-
if in.featureEnabled(Feature.clauseInterleaving) then
3664+
val paramss =
3665+
if in.featureEnabled(Feature.clauseInterleaving) then
36663666
// If you are making interleaving stable manually, please refer to the PR introducing it instead, section "How to make non-experimental"
36673667
typeOrTermParamClauses(ParamOwner.Def, numLeadParams = numLeadParams)
36683668
else
@@ -3672,7 +3672,7 @@ object Parsers {
36723672
joinParams(tparams, vparamss)
36733673

36743674
var tpt = fromWithinReturnType { typedOpt() }
3675-
3675+
36763676
if (migrateTo3) newLineOptWhenFollowedBy(LBRACE)
36773677
val rhs =
36783678
if in.token == EQUALS then

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class LazyVals extends MiniPhase with IdentityDenotTransformer {
283283
*
284284
* ```
285285
* private @volatile var _x: AnyRef = null
286-
*
286+
*
287287
* def x: A =
288288
* val result = _x
289289
* if result.isInstanceOf[A] then
@@ -292,7 +292,7 @@ class LazyVals extends MiniPhase with IdentityDenotTransformer {
292292
* null // possible unboxing applied here
293293
* else
294294
* x_compute() // possible unboxing applied here
295-
*
295+
*
296296
* private def x_compute(): AnyRef =
297297
* while <EmptyTree> do
298298
* val current: AnyRef = _x

compiler/src/dotty/tools/dotc/util/lrutest.sc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ object lrutest {
1515
cache.last //> res4: Int = 6
1616
cache lookup "hi" //> res5: String = x
1717
cache.indices.take(10).toList //> res6: List[Int] = List(7, 0, 1, 2, 3, 4, 5, 6, 7, 0)
18-
18+
1919
for (i <- 1 to 10) {
2020
if (cache.lookup(i.toString) == null)
2121
cache.enter(i.toString, i.toString)
2222
}
23-
23+
2424
cache.indices.take(10).toList //> res7: List[Int] = List(5, 6, 7, 0, 1, 2, 3, 4, 5, 6)
2525
cache //> res8: dotty.tools.dotc.util.LRUCache[String,String] = LRUCache(10 -> 10, 9 -
2626
//| > 9, 8 -> 8, 7 -> 7, 6 -> 6, 5 -> 5, 4 -> 4, 3 -> 3)
@@ -35,6 +35,6 @@ object lrutest {
3535
//| > 10, 7 -> 7, 9 -> 9, 8 -> 8, 6 -> 6, 4 -> 4, 3 -> 3)
3636
cache.lookup("11") //> res16: String = null
3737
cache.enter("11", "!!")
38-
cache //> res17: dotty.tools.dotc.util.LRUCache[String,String] = LRUCache(11 -> !!, 5
38+
cache //> res17: dotty.tools.dotc.util.LRUCache[String,String] = LRUCache(11 -> !!, 5
3939
//| -> 5, 10 -> 10, 7 -> 7, 9 -> 9, 8 -> 8, 6 -> 6, 4 -> 4)
4040
}

compiler/src/dotty/tools/io/JDK9Reflectors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public final class JDK9Reflectors {
3232
}
3333

3434
// Classes from java.lang.Runtime are not available in JDK 8 so using them explicitly would prevent this file from compiling with JDK 8
35-
// but these methods are not called in runtime when using this version of JDK
35+
// but these methods are not called in runtime when using this version of JDK
3636

3737
public static /*java.lang.Runtime.Version*/ Object runtimeVersionParse(String string) {
3838
try {

compiler/src/dotty/tools/runner/ScalaClassLoader.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ object ScalaClassLoader {
6767
@sharable private[this] val bootClassLoader: ClassLoader =
6868
if scala.util.Properties.isJavaAtLeast("9") then
6969
try
70-
ClassLoader.getSystemClassLoader.getParent
70+
ClassLoader.getSystemClassLoader.getParent
7171
catch case _: Throwable => null
7272
else null
7373

compiler/test/worksheets/baseTypetest.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ object baseTypetest extends DottyTest {
2222
defn.StringClass isSubClass defn.NullClass //> res4: Boolean = false
2323
defn.StringClass.typeRef.baseType(defn.NullClass)
2424
//> res5: dotty.tools.dotc.core.Types.Type = NoType
25-
25+
2626
}

compiler/test/worksheets/denotTest.sc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Types._, Symbols._
77

88
object denotTest extends DottyTest {
99
println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet
10-
10+
1111
val str = defn.StringClass.typeRef //> str : dotty.tools.dotc.core.Types.TypeRef = TypeRef(ThisType(module class l
1212
//| ang#57),String)
1313
val d= str.member("getBytes".toTermName) //> d : dotty.tools.dotc.core.Denotations.Denotation = val getBytes <and> val g
@@ -47,7 +47,7 @@ object denotTest extends DottyTest {
4747
//| a#35),Array), scala$Array$$T, TypeAlias(TypeRef(ThisType(module class scala#
4848
//| 35),Char))), TypeRef(ThisType(module class scala#35),Int), TypeRef(ThisType(
4949
//| module class scala#35),Int)), TypeRef(ThisType(module class lang#57),String)
50-
//| ), JavaMethodType(List(x$0), List(RefinedType(TypeRef(ThisType(module class
50+
//| ), JavaMethodType(List(x$0), List(RefinedType(TypeRef(ThisType(module class
5151
//| scala#35),Array), scala$Array$$T, TypeAlias(TypeRef(ThisType(module class sc
5252
//| ala#35),Char)))), TypeRef(ThisType(module class lang#57),String)), JavaMetho
5353
//| dType(List(x$0), List(TypeRef(ThisType(module class scala#35),Any)), TypeRef

compiler/test/worksheets/nesting.sc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ package dotty.tools.dotc.core
22

33
object nesting {
44
class C {
5-
5+
66
class D {
77
private def x = "D"
88
def show = x
99
class E {
1010
println(x)
1111
}
1212
}
13-
13+
1414
val foo: D = {
1515
class D extends C.this.D {
1616
private def x = "foo.D"
@@ -21,11 +21,11 @@ object nesting {
2121
new D
2222
}
2323
}
24-
24+
2525
val c = new C //> c : dotty.tools.dotc.core.nesting.C = dotty.tools.dotc.core.nesting$C@1a84d
2626
//| a23
2727
val d = c.foo //> d : dotty.tools.dotc.core.nesting.c.D = dotty.tools.dotc.core.nesting$C$D$1
2828
//| @2705d88a
2929
d.show //> res0: String = foo.D
30-
30+
3131
}

compiler/test/worksheets/periodtest.sc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package dotty.tools.dotc.core
22

33
object periodtest {
44
println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet
5-
5+
66
import Periods._
7-
7+
88
val p1 = Period(1, 2, 7) //> p1 : dotty.tools.dotc.core.Periods.Period = Period(2..7, run = 1)
99
val p2 = Period(1, 3, 7) //> p2 : dotty.tools.dotc.core.Periods.Period = Period(3..7, run = 1)
1010
p1 contains p2 //> res0: Boolean = true

compiler/test/worksheets/positiontest.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Positions._
55

66
object positiontest {
77
println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet
8-
8+
99
val p = Position(0, 1, 0) //> p : dotty.tools.dotc.util.Positions.Position = [0..1]
1010
val p2 = Position(0, 2) //> p2 : dotty.tools.dotc.util.Positions.Position = [0..2]
1111
val p3 = Position(1, 0) //> p3 : dotty.tools.dotc.util.Positions.Position = [no position]

compiler/test/worksheets/testnames.sc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ package dotty.tools.dotc.core
22

33
object testnames {
44
println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet
5-
5+
66
import Names._
77
val n = termName("hello") //> n : dotty.tools.dotc.core.Names.TermName = hello
88
val tn = n.toTypeName //> tn : dotty.tools.dotc.core.Names.TypeName = hello
99
val ln = n.toLocalName //> ln : dotty.tools.dotc.core.Names.LocalName = hello
1010
assert(tn.toTermName eq n)
1111
assert(tn.toLocalName eq ln)
1212
assert(n.toLocalName eq ln)
13-
13+
1414
n == tn //> res0: Boolean = false
1515
n == ln //> res1: Boolean = false
1616
n eq tn //> res2: Boolean = false
@@ -19,7 +19,7 @@ object testnames {
1919
val foo = encodedTermName("++") //> foo : dotty.tools.dotc.core.Names.TermName = $plus$plus
2020
foo.hashCode //> res5: Int = 5
2121
foo.toTypeName.hashCode //> res6: Int = -5
22-
22+
2323
val nfoo = n ++ foo //> nfoo : dotty.tools.dotc.core.testnames.n.ThisName = hello$plus$plus
2424
nfoo contains '$' //> res7: Boolean = true
2525
nfoo.replace('$', '.') //> res8: dotty.tools.dotc.core.testnames.nfoo.ThisName = hello.plus.plus
@@ -36,7 +36,7 @@ object testnames {
3636
termName("abc") //> res18: dotty.tools.dotc.core.Names.TermName = abc
3737
nfoo.filter(_ >= 'l') //> res19: dotty.tools.dotc.core.Names.Name = lloplusplus
3838
nfoo map (_.toUpper) //> res20: dotty.tools.dotc.core.Names.Name = HELLO$PLUS$PLUS
39-
39+
4040
import Decorators._
4141

4242
val local = "local".toTermName.toLocalName //> local : dotty.tools.dotc.core.Names.LocalName = local

library/src/scala/runtime/LazyVals.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import scala.annotation.*
1010
object LazyVals {
1111
@nowarn
1212
private[this] val unsafe: sun.misc.Unsafe = {
13-
def throwInitializationException() =
13+
def throwInitializationException() =
1414
throw new ExceptionInInitializerError(
1515
new IllegalStateException("Can't find instance of sun.misc.Unsafe")
1616
)

sbt-test/sbt-dotty/tasty-inspector-jars/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ lazy val inspector = project
1515
.settings(
1616
scalaVersion := dottyVersion,
1717
libraryDependencies += "org.scala-lang" %% "scala3-tasty-inspector" % scalaVersion.value,
18-
runTest :=
18+
runTest :=
1919
Def.sequential(
2020
Def.task(IO.copyFile((lib/Compile/packageBin).value, jarDest)),
2121
(Compile/run).toTask(" " + jarDest.getAbsolutePath)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
object A
1+
object A

0 commit comments

Comments
 (0)