From 6195874de19bd7d1fdcd6130ef51d3cb622b7a7f Mon Sep 17 00:00:00 2001 From: Nafer Sanabria Date: Tue, 7 May 2024 14:45:17 -0500 Subject: [PATCH] Fix duplicate word in comments --- compiler/src/dotty/tools/dotc/ast/tpd.scala | 2 +- compiler/src/dotty/tools/dotc/transform/CheckUnused.scala | 2 +- compiler/src/dotty/tools/dotc/typer/Synthesizer.scala | 2 +- compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala | 2 +- compiler/test/dotty/tools/scripting/BashExitCodeTests.scala | 2 +- .../src/scala/collection/mutable/ArrayBuffer.scala | 2 +- staging/src/scala/quoted/staging/Compiler.scala | 2 +- tests/neg-macros/tasty-macro-error/quoted_1.scala | 2 +- tests/neg-macros/tasty-macro-positions/quoted_1.scala | 4 ++-- tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala index faace26de84d..514ac46170e1 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -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: diff --git a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala index bd4ef73d6eea..d420fe78107e 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala @@ -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 * diff --git a/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala b/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala index 6b18540b6551..7f6be8f89314 100644 --- a/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala @@ -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` diff --git a/compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala b/compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala index 44886d59ac12..ac1cbbfb6bb5 100644 --- a/compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala +++ b/compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala @@ -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 diff --git a/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala b/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala index cc53447cd64b..9b65522fc549 100644 --- a/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala +++ b/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala @@ -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)*) diff --git a/scala2-library-cc/src/scala/collection/mutable/ArrayBuffer.scala b/scala2-library-cc/src/scala/collection/mutable/ArrayBuffer.scala index 85a045c34423..b47b25f9529f 100644 --- a/scala2-library-cc/src/scala/collection/mutable/ArrayBuffer.scala +++ b/scala2-library-cc/src/scala/collection/mutable/ArrayBuffer.scala @@ -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 diff --git a/staging/src/scala/quoted/staging/Compiler.scala b/staging/src/scala/quoted/staging/Compiler.scala index b37e8d4f70f2..2cc3aa6555c1 100644 --- a/staging/src/scala/quoted/staging/Compiler.scala +++ b/staging/src/scala/quoted/staging/Compiler.scala @@ -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: * ``` diff --git a/tests/neg-macros/tasty-macro-error/quoted_1.scala b/tests/neg-macros/tasty-macro-error/quoted_1.scala index b395ec4c240b..8a4c45e46c89 100644 --- a/tests/neg-macros/tasty-macro-error/quoted_1.scala +++ b/tests/neg-macros/tasty-macro-error/quoted_1.scala @@ -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) '{} } diff --git a/tests/neg-macros/tasty-macro-positions/quoted_1.scala b/tests/neg-macros/tasty-macro-positions/quoted_1.scala index b77373baa21c..a64e575a8d4d 100644 --- a/tests/neg-macros/tasty-macro-positions/quoted_1.scala +++ b/tests/neg-macros/tasty-macro-positions/quoted_1.scala @@ -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)) '{} } diff --git a/tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala b/tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala index 6ead3134235a..d1a017d67f20 100644 --- a/tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala +++ b/tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala @@ -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`