Skip to content

Commit

Permalink
Fix duplicate word in comments
Browse files Browse the repository at this point in the history
[Cherry-picked 6195874][modified]
  • Loading branch information
WojciechMazur committed Jul 6, 2024
1 parent 1ee9297 commit ca82209
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
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

0 comments on commit ca82209

Please sign in to comment.