Skip to content

Commit

Permalink
Fix duplicate word in comments (#20359)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal authored May 10, 2024
2 parents 89dec7a + 6195874 commit 7f0d225
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/ast/tpd.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
!(sym.is(Method) && sym.info.isInstanceOf[MethodOrPoly]) // if is a method it is parameterless
}

/** A tree traverser that generates the the same import contexts as original typer for statements.
/** A tree traverser that generates the same import contexts as original typer for statements.
* TODO: Should we align TreeMapWithPreciseStatContexts and also keep track of exprOwners?
*/
abstract class TreeTraverserWithPreciseImportContexts extends TreeTraverser:
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/CheckUnused.scala
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ object CheckUnused:
symbol.name.mangledString.contains("$")

/**
* Is the the constructor of synthetic package object
* Is the constructor of synthetic package object
* Should be ignored as it is always imported/used in package
* Trigger false negative on used import
*
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Synthesizer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
else
refineAtPrefix(childPre, childClass, childClass.primaryConstructor.info) match
case info: PolyType =>
// Compute the the full child type by solving the subtype constraint
// Compute the full child type by solving the subtype constraint
// `C[X1, ..., Xn] <: P`, where
//
// - P is the current `mirroredType`
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import dotty.tools.dotc.util.optional
* - `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}`.
* - `lift(x1, .., xn)('{e})` returns `(y1, ..., yn) => [xi = $yi]'{e}` where `yi` is an `Expr` of the type of `xi`.
* - `withEnv(x1 -> y1, ..., xn -> yn)(matching)` evaluates matching recording that `xi` is equivalent to `yi`.
* - `matched` denotes that the the match succeeded and `matched('{e})` denotes that a match succeeded and extracts `'{e}`
* - `matched` denotes that the match succeeded and `matched('{e})` denotes that a match succeeded and extracts `'{e}`
* - `&&&` matches if both sides match. Concatenates the extracted expressions of both sides.
*
* Note: that not all quoted terms bellow are valid expressions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class BashExitCodeTests:
s"expected $expectedExitCode but got $exitCode${pp("out", stdout)}${pp("err", stderr)}"
}, expectedExitCode, exitCode)

// Helpers for running scala, scalac, and scalac without the the output directory ("raw")
// Helpers for running scala, scalac, and scalac without the output directory ("raw")
def scala(args: String*) = verifyExit(scalaPath, args*)
def scalacRaw(args: String*) = verifyExit(scalacPath, args*)
def scalac(args: String*) = scalacRaw(("-d" +: tmpDir +: args)*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class ArrayBuffer[A] private (initialElements: Array[AnyRef], initialSize: Int)
// the previous line
// - `copyElemsToArray` will call `System.arraycopy`
// - `System.arraycopy` will effectively "read" all the values before
// overwriting any of them when two arrays are the the same reference
// overwriting any of them when two arrays are the same reference
val actual = IterableOnce.copyElemsToArray(elems, array.asInstanceOf[Array[Any]], index, elemsLength)
if (actual != elemsLength) throw new IllegalStateException(s"Copied $actual of $elemsLength")
size0 = len + elemsLength // update size AFTER the copy, in case we're inserting a proxy
Expand Down
2 changes: 1 addition & 1 deletion staging/src/scala/quoted/staging/Compiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trait Compiler:

object Compiler:

/** Create a new instance of the compiler using the the classloader of the application.
/** Create a new instance of the compiler using the classloader of the application.
*
* Usage:
* ```
Expand Down
2 changes: 1 addition & 1 deletion tests/neg-macros/tasty-macro-error/quoted_1.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object Macros {

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

Expand Down
4 changes: 2 additions & 2 deletions tests/neg-macros/tasty-macro-positions/quoted_1.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ object Macros {
def impl(x: Expr[Any])(using Quotes) : Expr[Unit] = {
import quotes.reflect.*
val pos = x.asTerm.underlyingArgument.pos
report.error("here is the the argument is " + x.asTerm.underlyingArgument.show, pos)
report.error("here (+5) is the the argument is " + x.asTerm.underlyingArgument.show, Position(pos.sourceFile, pos.start + 5, pos.end + 5))
report.error("here is the argument is " + x.asTerm.underlyingArgument.show, pos)
report.error("here (+5) is the argument is " + x.asTerm.underlyingArgument.show, Position(pos.sourceFile, pos.start + 5, pos.end + 5))
'{}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
else
refineAtPrefix(childPre, childClass, childClass.primaryConstructor.info) match
case info: PolyType =>
// Compute the the full child type by solving the subtype constraint
// Compute the full child type by solving the subtype constraint
// `C[X1, ..., Xn] <: P`, where
//
// - P is the current `mirroredType`
Expand Down

0 comments on commit 7f0d225

Please sign in to comment.