Skip to content

Commit 7f0d225

Browse files
authored
Fix duplicate word in comments (#20359)
2 parents 89dec7a + 6195874 commit 7f0d225

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

Diff for: compiler/src/dotty/tools/dotc/ast/tpd.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
12741274
!(sym.is(Method) && sym.info.isInstanceOf[MethodOrPoly]) // if is a method it is parameterless
12751275
}
12761276

1277-
/** A tree traverser that generates the the same import contexts as original typer for statements.
1277+
/** A tree traverser that generates the same import contexts as original typer for statements.
12781278
* TODO: Should we align TreeMapWithPreciseStatContexts and also keep track of exprOwners?
12791279
*/
12801280
abstract class TreeTraverserWithPreciseImportContexts extends TreeTraverser:

Diff for: compiler/src/dotty/tools/dotc/transform/CheckUnused.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ object CheckUnused:
624624
symbol.name.mangledString.contains("$")
625625

626626
/**
627-
* Is the the constructor of synthetic package object
627+
* Is the constructor of synthetic package object
628628
* Should be ignored as it is always imported/used in package
629629
* Trigger false negative on used import
630630
*

Diff for: compiler/src/dotty/tools/dotc/typer/Synthesizer.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
536536
else
537537
refineAtPrefix(childPre, childClass, childClass.primaryConstructor.info) match
538538
case info: PolyType =>
539-
// Compute the the full child type by solving the subtype constraint
539+
// Compute the full child type by solving the subtype constraint
540540
// `C[X1, ..., Xn] <: P`, where
541541
//
542542
// - P is the current `mirroredType`

Diff for: compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import dotty.tools.dotc.util.optional
2626
* - `isClosedUnder(x1, .., xn)('{e})` returns true if and only if all the references in `e` to names defined in the pattern are contained in the set `{x1, ... xn}`.
2727
* - `lift(x1, .., xn)('{e})` returns `(y1, ..., yn) => [xi = $yi]'{e}` where `yi` is an `Expr` of the type of `xi`.
2828
* - `withEnv(x1 -> y1, ..., xn -> yn)(matching)` evaluates matching recording that `xi` is equivalent to `yi`.
29-
* - `matched` denotes that the the match succeeded and `matched('{e})` denotes that a match succeeded and extracts `'{e}`
29+
* - `matched` denotes that the match succeeded and `matched('{e})` denotes that a match succeeded and extracts `'{e}`
3030
* - `&&&` matches if both sides match. Concatenates the extracted expressions of both sides.
3131
*
3232
* Note: that not all quoted terms bellow are valid expressions

Diff for: compiler/test/dotty/tools/scripting/BashExitCodeTests.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class BashExitCodeTests:
2828
s"expected $expectedExitCode but got $exitCode${pp("out", stdout)}${pp("err", stderr)}"
2929
}, expectedExitCode, exitCode)
3030

31-
// Helpers for running scala, scalac, and scalac without the the output directory ("raw")
31+
// Helpers for running scala, scalac, and scalac without the output directory ("raw")
3232
def scala(args: String*) = verifyExit(scalaPath, args*)
3333
def scalacRaw(args: String*) = verifyExit(scalacPath, args*)
3434
def scalac(args: String*) = scalacRaw(("-d" +: tmpDir +: args)*)

Diff for: scala2-library-cc/src/scala/collection/mutable/ArrayBuffer.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class ArrayBuffer[A] private (initialElements: Array[AnyRef], initialSize: Int)
197197
// the previous line
198198
// - `copyElemsToArray` will call `System.arraycopy`
199199
// - `System.arraycopy` will effectively "read" all the values before
200-
// overwriting any of them when two arrays are the the same reference
200+
// overwriting any of them when two arrays are the same reference
201201
val actual = IterableOnce.copyElemsToArray(elems, array.asInstanceOf[Array[Any]], index, elemsLength)
202202
if (actual != elemsLength) throw new IllegalStateException(s"Copied $actual of $elemsLength")
203203
size0 = len + elemsLength // update size AFTER the copy, in case we're inserting a proxy

Diff for: staging/src/scala/quoted/staging/Compiler.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ trait Compiler:
1111

1212
object Compiler:
1313

14-
/** Create a new instance of the compiler using the the classloader of the application.
14+
/** Create a new instance of the compiler using the classloader of the application.
1515
*
1616
* Usage:
1717
* ```

Diff for: tests/neg-macros/tasty-macro-error/quoted_1.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ object Macros {
66

77
def impl(x: Expr[Any])(using Quotes) : Expr[Unit] = {
88
import quotes.reflect.*
9-
report.error("here is the the argument is " + x.asTerm.underlyingArgument.show, x.asTerm.underlyingArgument.pos)
9+
report.error("here is the argument is " + x.asTerm.underlyingArgument.show, x.asTerm.underlyingArgument.pos)
1010
'{}
1111
}
1212

Diff for: tests/neg-macros/tasty-macro-positions/quoted_1.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ object Macros {
77
def impl(x: Expr[Any])(using Quotes) : Expr[Unit] = {
88
import quotes.reflect.*
99
val pos = x.asTerm.underlyingArgument.pos
10-
report.error("here is the the argument is " + x.asTerm.underlyingArgument.show, pos)
11-
report.error("here (+5) is the the argument is " + x.asTerm.underlyingArgument.show, Position(pos.sourceFile, pos.start + 5, pos.end + 5))
10+
report.error("here is the argument is " + x.asTerm.underlyingArgument.show, pos)
11+
report.error("here (+5) is the argument is " + x.asTerm.underlyingArgument.show, Position(pos.sourceFile, pos.start + 5, pos.end + 5))
1212
'{}
1313
}
1414

Diff for: tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
498498
else
499499
refineAtPrefix(childPre, childClass, childClass.primaryConstructor.info) match
500500
case info: PolyType =>
501-
// Compute the the full child type by solving the subtype constraint
501+
// Compute the full child type by solving the subtype constraint
502502
// `C[X1, ..., Xn] <: P`, where
503503
//
504504
// - P is the current `mirroredType`

0 commit comments

Comments
 (0)