Skip to content

Backport "Fix duplicate word in comments" to LTS #21104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -504,7 +504,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 @@ -26,7 +26,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
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