Skip to content

Commit d3a2d61

Browse files
Merge pull request #7696 from bwignall/typo
Fix typos
2 parents bc4c565 + 6ad4a3d commit d3a2d61

File tree

28 files changed

+32
-32
lines changed

28 files changed

+32
-32
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
7676

7777
override def getCurrentCUnit(): CompilationUnit = { cunit }
7878

79-
/* ---------------- helper utils for generating classes and fiels ---------------- */
79+
/* ---------------- helper utils for generating classes and fields ---------------- */
8080

8181
def genPlainClass(cd: ClassDef) = cd match {
8282
case ClassDef(_, _, _, impl) =>

compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ trait BCodeSyncAndTry extends BCodeBodyBuilder {
310310
* ------
311311
*/
312312

313-
// a note on terminology: this is not "postHandlers", despite appearences.
313+
// a note on terminology: this is not "postHandlers", despite appearances.
314314
// "postHandlers" as in the source-code view. And from that perspective, both (3.A) and (3.B) are invisible implementation artifacts.
315315
if (hasFinally) withFreshCleanupScope {
316316
nopIfNeeded(startTryBody)

compiler/src/dotty/tools/backend/jvm/BTypes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ abstract class BTypes {
362362
*
363363
* - Initializer block (JLS 8.6 / 8.7): block of statements in a java class
364364
* - static initializer: executed before constructor body
365-
* - instance initializer: exectued when class is initialized (instance creation, static
365+
* - instance initializer: executed when class is initialized (instance creation, static
366366
* field access, ...)
367367
*
368368
* - A static nested class can be defined as

compiler/src/dotty/tools/dotc/core/Flags.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ object Flags {
133133
strs filter (_.nonEmpty)
134134
}
135135

136-
/** The list of non-empty names of flags that are set in teh given flag set */
136+
/** The list of non-empty names of flags that are set in the given flag set */
137137
def flagStrings(privateWithin: String): Seq[String] = {
138138
var rawStrings = (2 to MaxFlag).flatMap(x.flagString(_)) // DOTTY problem: cannot drop with (_)
139139
if (!privateWithin.isEmpty && !x.is(Protected))

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
137137
protected def approxState: ApproxState = approx
138138

139139
/** The original left-hand type of the comparison. Gets reset
140-
* everytime we compare components of the previous pair of types.
140+
* every time we compare components of the previous pair of types.
141141
* This type is used for capture conversion in `isSubArgs`.
142142
*/
143143
private [this] var leftRoot: Type = _

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ class ClassfileParser(
468468
classTParams = tparams
469469
val parents = new ListBuffer[Type]()
470470
while (index < end)
471-
parents += sig2type(tparams, skiptvs = false) // here the variance doesnt'matter
471+
parents += sig2type(tparams, skiptvs = false) // here the variance doesn't matter
472472
TempClassInfoType(parents.toList, instanceScope, owner)
473473
}
474474
if (ownTypeParams.isEmpty) tpe else TempPolyType(ownTypeParams, tpe)

compiler/src/dotty/tools/dotc/transform/Pickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Pickler extends Phase {
2424

2525
override def phaseName: String = Pickler.name
2626

27-
// No need to repickle trees comming from TASTY
27+
// No need to repickle trees coming from TASTY
2828
override def isRunnable(implicit ctx: Context): Boolean =
2929
super.isRunnable && !ctx.settings.fromTasty.value
3030

compiler/src/dotty/tools/dotc/transform/ReifyQuotes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class ReifyQuotes extends MacroTransform {
328328
}
329329
)
330330
}
331-
/* Lambdas are generated outside the quote that is beeing reified (i.e. in outer.owner).
331+
/* Lambdas are generated outside the quote that is being reified (i.e. in outer.owner).
332332
* In case the case that level == -1 the code is not in a quote, it is in an inline method,
333333
* hence we should take that as owner directly.
334334
*/

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
12961296
else normalizedSplice.withSpan(span)
12971297
}
12981298

1299-
/** Return the set of symbols that are refered at level -1 by the tree and defined in the current run.
1299+
/** Return the set of symbols that are referred at level -1 by the tree and defined in the current run.
13001300
* This corresponds to the symbols that will need to be interpreted.
13011301
*/
13021302
private def macroDependencies(tree: Tree)(implicit ctx: Context) =

compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ trait QuotesAndSplices {
270270
* will also transform it into a call to `scala.internal.quoted.Expr.unapply`.
271271
*
272272
* Code directly inside the quote is typed as an expression using Mode.QuotedPattern. Splices
273-
* within the quotes become patterns again and typed acordingly.
273+
* within the quotes become patterns again and typed accordingly.
274274
*
275275
* ```
276276
* case '{ ($ls: List[$t]) } =>

compiler/src/dotty/tools/repl/Rendering.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private[repl] class Rendering(parentClassLoader: Option[ClassLoader] = None) {
4040
myClassLoader = new AbstractFileClassLoader(ctx.settings.outputDir.value, parent)
4141
myReplStringOf = {
4242
// We need to use the ScalaRunTime class coming from the scala-library
43-
// on the user classpath, and not the one avilable in the current
43+
// on the user classpath, and not the one available in the current
4444
// classloader, so we use reflection instead of simply calling
4545
// `ScalaRunTime.replStringOf`.
4646
val scalaRuntime = Class.forName("scala.runtime.ScalaRunTime", true, myClassLoader)

compiler/test/dotty/tools/ContextEscapeDetector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private static synchronized void forceGCHeuristic1() {
6767

6868
private static synchronized void forceGCHeuristic2() {
6969
try {
70-
Object[] arr = new Object[1024]; // upto 8 GB
70+
Object[] arr = new Object[1024]; // up to 8 GB
7171
WeakReference<Object> ref = new WeakReference<>(arr);
7272
o = arr; // make sure array isn't optimized away
7373

docs/docs/contributing/debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Then:
4949
dotc ../issues/Playground.scala
5050
```
5151

52-
The techniques discussed below can be tried out in place of `println("Hello Debug")` in that location. They are of course applicable thoughout the codebase.
52+
The techniques discussed below can be tried out in place of `println("Hello Debug")` in that location. They are of course applicable throughout the codebase.
5353

5454
## Show for human readable output
5555
Many objects in the compiler have a `show` method available on them via implicit rich wrapper:

docs/docs/reference/contextual/derivation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ types refined as revealed by the match.
211211

212212
In the sum case, `eqSum`, we use the runtime `ordinal` values of the arguments to `eqv` to first check if the two
213213
values are of the same subtype of the ADT (3) and then, if they are, to further test for equality based on the `Eq`
214-
instance for the appropriate ADT subtype using the auxilliary method `check` (4).
214+
instance for the appropriate ADT subtype using the auxiliary method `check` (4).
215215

216216
```scala
217217
def eqSum[T](s: Mirror.SumOf[T], elems: List[Eq[_]]): Eq[T] =

docs/docs/reference/metaprogramming/macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def showExpr[T](expr: Expr[T]): Expr[String] = {
311311
That is, the `showExpr` method converts its `Expr` argument to a string (`code`), and lifts
312312
the result back to an `Expr[String]` using `Expr.apply`.
313313

314-
**Note**: Lifting `String` to `Expr[String]` using `Expr(code)` can be ommited by importing an implicit
314+
**Note**: Lifting `String` to `Expr[String]` using `Expr(code)` can be omitted by importing an implicit
315315
conversion with `import scala.quoted.autolift.given`. The programmer is able to
316316
declutter slightly the code at the cost of readable _phase distinction_ between
317317
stages.

docs/docs/reference/new-types/dependent-function-types-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ where the result type parameter `R'` is the least upper approximation of the
3434
precise result type `R` without any referance to value parameters `x1, ..., xN`.
3535

3636
The syntax and sementics of anonymous dependent functions is identical to the
37-
one of regular functions. Eta expansion is naturaly generalized to produce
37+
one of regular functions. Eta expansion is naturally generalized to produce
3838
dependent function types for methods with dependent result types.
3939

4040
Dependent functions can be implicit, and generalize to arity `N > 22` in the

library/src-bootstrapped/scala/quoted/util/Var.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ sealed trait Var[T] {
1515

1616
object Var {
1717
/** Create a variable initialized with `init` and used in `body`.
18-
* `body` recieves a `Var[T]` argument which exposes `get` and `update`.
18+
* `body` receives a `Var[T]` argument which exposes `get` and `update`.
1919
*
2020
* Var('{7}) {
2121
* x => '{

library/src/scala/internal/Quoted.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ object Quoted {
3535
*
3636
* During quote reification a quote `'{ ... F[$t] ... }` will be transformed into
3737
* `'{ @quoteTypeTag type T$1 = $t ... F[T$1] ... }` to have a tree for `$t`.
38-
* This artifact is removed durring quote unpickling.
38+
* This artifact is removed during quote unpickling.
3939
*
4040
* See ReifyQuotes.scala and PickledQuotes.scala
4141
*/

library/src/scala/tasty/reflect/CompilerInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ trait CompilerInterface {
886886
def TypeRef_qualifier(self: TypeRef)(given ctx: Context): TypeOrBounds
887887
def TypeRef_name(self: TypeRef)(given Context): String
888888

889-
/** Type of a `super` refernce */
889+
/** Type of a `super` reference */
890890
type SuperType <: Type
891891

892892
def isInstanceOfSuperType(given ctx: Context): IsInstanceOf[SuperType]

library/src/scala/tasty/reflect/Core.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ trait Core {
312312
/** Type of a reference to a type symbol */
313313
type TypeRef = internal.TypeRef
314314

315-
/** Type of a `super` refernce */
315+
/** Type of a `super` reference */
316316
type SuperType = internal.SuperType
317317

318318
/** A type with a type refinement `T { type U }` */

library/src/scala/tasty/reflect/FlagsOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ trait FlagsOps extends Core {
5656
/** Is this symbol `inline` */
5757
def Inline: Flags = internal.Flags_Inline
5858

59-
/** Is this symbol markes as a macro. An inline method containing toplevel splices */
59+
/** Is this symbol marked as a macro. An inline method containing toplevel splices */
6060
def Macro: Flags = internal.Flags_Macro
6161

6262
/** Is this symbol marked as static. Mapped to static Java member */

library/src/scala/tasty/reflect/SymbolOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ trait SymbolOps extends Core { selfSymbolOps: FlagsOps =>
128128
def isTypeParam(given ctx: Context): Boolean =
129129
internal.Symbol_isTypeParam(self)
130130

131-
/** Signature of this defintion */
131+
/** Signature of this definition */
132132
def signature(given ctx: Context): Signature =
133133
internal.Symbol_signature(self)
134134

tastydoc/src/dotty/tastydoc/TastyTypeConverter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ trait TastyTypeConverter {
4646
case r if (info match {case reflect.IsTypeBounds(info) => true case _ => false}) => ("type", name, r)
4747
case r@TypeReference(_, _, _, _) => ("val", name, r)
4848
case ByNameReference(rChild) => ("def", name, rChild)
49-
case r => throw new Exception("Match error in info of Refinement. This should not happend, please open an issue. " + r)
49+
case r => throw new Exception("Match error in info of Refinement. This should not happen, please open an issue. " + r)
5050
}
5151
convertTypeToReference(reflect)(parent) match {
5252
case RefinedReference(p, ls) =>

tests/disabled/reflect/run/t8190.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import scala.reflect.runtime.universe._
22

33
trait Overloads {
4-
// makes sure noone erases to Any or AnyRef
4+
// makes sure no one erases to Any or AnyRef
55
def test(x: AnyRef) = "AnyRef"
66
def test(x: Annotation) = "Annotation"
77
def test(x: Constant) = "Constant"

tests/neg/repeatedArgs213.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class repeatedArgs {
88
bar("a", "b", "c")
99
bar(xs: _*)
1010
bar(ys: _*) // error: immutable.Seq expected, found Seq
11-
bar(zs: _*) // old-error: Remove (compiler generated) Array to Seq convertion in 2.13?
11+
bar(zs: _*) // old-error: Remove (compiler generated) Array to Seq conversion in 2.13?
1212

1313
Paths.get("Hello", "World")
1414
Paths.get("Hello", xs: _*)

tests/pos/givenIn.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ object Test {
1212
def g(given Context) = ()
1313
ctx.givenIn(g)
1414

15-
/* The last three statements shoudl generate the following code:
15+
/* The last three statements should generate the following code:
1616
1717
def ctx: Test.Context = new Test.Context()
1818
def g(implicit x$1: Test.Context): Unit = ()

tests/run-with-compiler-custom-args/tasty-interpreter/interpreter/jvm/Interpreter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import scala.tasty.Reflection
77
class Interpreter[R <: Reflection & Singleton](reflect0: R) extends TreeInterpreter[R](reflect0) {
88
import reflect.{_, given}
99

10-
// All references are represented by themselfs and values are boxed
10+
// All references are represented by themselves and values are boxed
1111
type AbstractAny = Any
1212

1313
val jvmReflection = new JVMReflection(reflect)

tests/untried/neg/structural.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ object Test extends App {
1111
def f2[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: B): Object; val x: B }) = x.m[Tata](x.x) //fail
1212
def f3[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: C): Object; val x: C }) = x.m[Tata](x.x) //fail
1313
def f4[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: D): Object; val x: D }) = x.m[Tata](x.x) //fail
14-
def f5[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: E): Object; val x: Tata }) = x.m[Tata](x.x) //suceed
14+
def f5[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: E): Object; val x: Tata }) = x.m[Tata](x.x) //succeed
1515

16-
def f6[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): A }) = x.m[Tata](null) //suceed
17-
def f7[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): B }) = x.m[Tata](null) //suceed
18-
def f8[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): C }) = x.m[Tata](null) //suceed
16+
def f6[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): A }) = x.m[Tata](null) //succeed
17+
def f7[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): B }) = x.m[Tata](null) //succeed
18+
def f8[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): C }) = x.m[Tata](null) //succeed
1919
def f9[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): D }) = x.m[Tata](null) //fail
20-
def f0[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): E }) = x.m[Tata](null) //suceed
20+
def f0[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): E }) = x.m[Tata](null) //succeed
2121

2222
}
2323

0 commit comments

Comments
 (0)