From dd1523fcc8dc26ab5f6a8cfe7ffb2c0871b0fa30 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Mon, 2 Dec 2024 20:54:17 +0100 Subject: [PATCH] fix typo (#21324) [Cherry-picked fd458478c669ba4dd64a06349fb2dcd374ff1617][modified] --- compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala | 2 +- compiler/src/dotty/tools/dotc/CompilationUnit.scala | 2 +- compiler/src/dotty/tools/dotc/Compiler.scala | 2 +- compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala | 2 +- compiler/src/dotty/tools/dotc/core/Annotations.scala | 2 +- compiler/src/dotty/tools/dotc/core/Contexts.scala | 2 +- compiler/src/dotty/tools/dotc/core/tasty/CommentPickler.scala | 2 +- compiler/src/dotty/tools/dotc/parsing/Scanners.scala | 2 +- compiler/src/dotty/tools/dotc/transform/CtxLazy.scala | 2 +- .../src/dotty/tools/dotc/transform/ElimErasedValueType.scala | 2 +- compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala | 2 +- compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala | 4 ++-- compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala | 2 +- compiler/src/dotty/tools/dotc/transform/SelectStatic.scala | 2 +- compiler/src/dotty/tools/dotc/typer/Synthesizer.scala | 2 +- compiler/src/dotty/tools/dotc/typer/Typer.scala | 2 +- docs/_docs/contributing/architecture/phases.md | 2 +- docs/_docs/internals/overall-structure.md | 2 +- .../dotty/tools/pc/tests/completion/CompletionArgSuite.scala | 4 ++-- scaladoc/src/dotty/tools/scaladoc/tasty/BasicSupport.scala | 2 +- .../interpreter/TreeInterpreter.scala | 2 +- tests/pos-with-compiler-cc/dotc/CompilationUnit.scala | 2 +- tests/pos-with-compiler-cc/dotc/Compiler.scala | 2 +- tests/pos-with-compiler-cc/dotc/config/Config.scala | 2 +- tests/pos-with-compiler-cc/dotc/core/Contexts.scala | 2 +- .../pos-with-compiler-cc/dotc/core/tasty/CommentPickler.scala | 2 +- tests/pos-with-compiler-cc/dotc/parsing/Scanners.scala | 2 +- tests/pos-with-compiler-cc/dotc/transform/CtxLazy.scala | 2 +- .../dotc/transform/ElimErasedValueType.scala | 2 +- tests/pos-with-compiler-cc/dotc/transform/ExpandSAMs.scala | 2 +- tests/pos-with-compiler-cc/dotc/transform/ExplicitOuter.scala | 4 ++-- .../pos-with-compiler-cc/dotc/transform/ReifiedReflect.scala | 2 +- tests/pos-with-compiler-cc/dotc/transform/SelectStatic.scala | 2 +- tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala | 2 +- tests/pos-with-compiler-cc/dotc/typer/Typer.scala | 2 +- tests/warn/i15503c.scala | 2 +- 36 files changed, 39 insertions(+), 39 deletions(-) diff --git a/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala b/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala index 671ba0b3088f..536ab887a740 100644 --- a/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala +++ b/compiler/src/dotty/tools/backend/jvm/ClassfileWriters.scala @@ -125,7 +125,7 @@ class ClassfileWriters(frontendAccess: PostProcessorFrontendAccess) { if (file.isInstanceOf[JarArchive]) { val jarCompressionLevel = compilerSettings.jarCompressionLevel // Writing to non-empty JAR might be an undefined behaviour, e.g. in case if other files where - // created using `AbstractFile.bufferedOutputStream`instead of JarWritter + // created using `AbstractFile.bufferedOutputStream`instead of JarWriter val jarFile = file.underlyingSource.getOrElse{ throw new IllegalStateException("No underlying source for jar") } diff --git a/compiler/src/dotty/tools/dotc/CompilationUnit.scala b/compiler/src/dotty/tools/dotc/CompilationUnit.scala index f9eb2755f8d8..8902a06efeda 100644 --- a/compiler/src/dotty/tools/dotc/CompilationUnit.scala +++ b/compiler/src/dotty/tools/dotc/CompilationUnit.scala @@ -72,7 +72,7 @@ class CompilationUnit protected (val source: SourceFile) { /** List of all comments present in this compilation unit */ var comments: List[Comment] = Nil - /** Suspends the compilation unit by thowing a SuspendException + /** Suspends the compilation unit by throwing a SuspendException * and recording the suspended compilation unit */ def suspend()(using Context): Nothing = diff --git a/compiler/src/dotty/tools/dotc/Compiler.scala b/compiler/src/dotty/tools/dotc/Compiler.scala index f100f036498e..5769a337aa48 100644 --- a/compiler/src/dotty/tools/dotc/Compiler.scala +++ b/compiler/src/dotty/tools/dotc/Compiler.scala @@ -111,7 +111,7 @@ class Compiler { new LetOverApply, // Lift blocks from receivers of applications new ArrayConstructors) :: // Intercept creation of (non-generic) arrays and intrinsify. List(new Erasure) :: // Rewrite types to JVM model, erasing all type parameters, abstract types and refinements. - List(new ElimErasedValueType, // Expand erased value types to their underlying implmementation types + List(new ElimErasedValueType, // Expand erased value types to their underlying implementation types new PureStats, // Remove pure stats from blocks new VCElideAllocations, // Peep-hole optimization to eliminate unnecessary value class allocations new EtaReduce, // Reduce eta expansions of pure paths to the underlying function reference diff --git a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala index 5ae9e2b2e32c..3ba7c6019246 100644 --- a/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala +++ b/compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala @@ -46,7 +46,7 @@ object CheckCaptures: * @param owner the current owner * @param nestedInOwner true if the environment is a temporary one nested in the owner's environment, * and does not have a different actual owner symbol (this happens when doing box adaptation). - * @param captured the caputure set containing all references to tracked free variables outside of boxes + * @param captured the capture set containing all references to tracked free variables outside of boxes * @param isBoxed true if the environment is inside a box (in which case references are not counted) * @param outer0 the next enclosing environment */ diff --git a/compiler/src/dotty/tools/dotc/core/Annotations.scala b/compiler/src/dotty/tools/dotc/core/Annotations.scala index 43c753458f6e..137c084d03a6 100644 --- a/compiler/src/dotty/tools/dotc/core/Annotations.scala +++ b/compiler/src/dotty/tools/dotc/core/Annotations.scala @@ -43,7 +43,7 @@ object Annotations { def argumentConstantString(i: Int)(using Context): Option[String] = for (case Constant(s: String) <- argumentConstant(i)) yield s - /** The tree evaluaton is in progress. */ + /** The tree evaluation is in progress. */ def isEvaluating: Boolean = false /** The tree evaluation has finished. */ diff --git a/compiler/src/dotty/tools/dotc/core/Contexts.scala b/compiler/src/dotty/tools/dotc/core/Contexts.scala index 1bf225edab8a..68505b4c082c 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -264,7 +264,7 @@ object Contexts { /** SourceFile with given path, memoized */ def getSource(path: String): SourceFile = getSource(path.toTermName) - /** AbstraFile with given path name, memoized */ + /** AbstractFile with given path name, memoized */ def getFile(name: TermName): AbstractFile = base.files.get(name) match case Some(file) => file diff --git a/compiler/src/dotty/tools/dotc/core/tasty/CommentPickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/CommentPickler.scala index fde6c669045d..1bf2e2cccecb 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/CommentPickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/CommentPickler.scala @@ -32,7 +32,7 @@ object CommentPickler: def traverse(x: Any): Unit = x match case x: untpd.Tree @unchecked => x match - case x: tpd.MemberDef @unchecked => // at this point all MembderDefs are t(y)p(e)d. + case x: tpd.MemberDef @unchecked => // at this point all MemberDefs are t(y)p(e)d. for comment <- docString(x) do pickleComment(addrOfTree(x), comment) case _ => val limit = x.productArity diff --git a/compiler/src/dotty/tools/dotc/parsing/Scanners.scala b/compiler/src/dotty/tools/dotc/parsing/Scanners.scala index f1e9e646bf43..0346b2c892e2 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Scanners.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Scanners.scala @@ -683,7 +683,7 @@ object Scanners { if !r.isOutermost && closingRegionTokens.contains(token) && !(token == CASE && r.prefix == MATCH) - && next.token == EMPTY // can be violated for ill-formed programs, e.g. neg/i12605.sala + && next.token == EMPTY // can be violated for ill-formed programs, e.g. neg/i12605.scala => insert(OUTDENT, offset) case _ => diff --git a/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala b/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala index 003aa3662c12..413f0b03f113 100644 --- a/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala +++ b/compiler/src/dotty/tools/dotc/transform/CtxLazy.scala @@ -9,7 +9,7 @@ import core.Contexts.* * with a different context. * * A typical use case is a lazy val in a phase object which exists once per root context where - * the expression intiializing the lazy val depends only on the root context, but not any changes afterwards. + * the expression initializing the lazy val depends only on the root context, but not any changes afterwards. */ class CtxLazy[T](expr: Context ?=> T) { private var myValue: T = _ diff --git a/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala b/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala index 0b0906148ba1..2deb50956537 100644 --- a/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala +++ b/compiler/src/dotty/tools/dotc/transform/ElimErasedValueType.scala @@ -13,7 +13,7 @@ import NameKinds.SuperAccessorName object ElimErasedValueType { val name: String = "elimErasedValueType" - val description: String = "expand erased value types to their underlying implmementation types" + val description: String = "expand erased value types to their underlying implementation types" def elimEVT(tp: Type)(using Context): Type = tp match { case ErasedValueType(_, underlying) => diff --git a/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala b/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala index abca2a6aa0ac..e9c16052894b 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala @@ -94,7 +94,7 @@ class ExpandSAMs extends MiniPhase: * } * ``` * - * is expanded to an anomymous class: + * is expanded to an anonymous class: * * ``` * val x: PartialFunction[A, B] = { diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala index 15dfda845389..0db1ddc5750c 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -101,7 +101,7 @@ class ExplicitOuter extends MiniPhase with InfoTransformer { thisPhase => val parentCls = parent.tpe.classSymbol.asClass parent match // if we are in a regular class and first parent is also a regular class, - // make sure we have a contructor + // make sure we have a constructor case parent: TypeTree if !cls.is(Trait) && !parentCls.is(Trait) && !defn.NotRuntimeClasses.contains(parentCls) => New(parent.tpe, Nil).withSpan(impl.span) @@ -454,7 +454,7 @@ object ExplicitOuter { val enclClass = ctx.owner.lexicallyEnclosingClass.asClass val outerAcc = atPhaseNoLater(lambdaLiftPhase) { // lambdalift mangles local class names, which means we cannot - // reliably find outer acessors anymore + // reliably find outer accessors anymore tree match case tree: This if tree.symbol == enclClass && !enclClass.is(Trait) => outerParamAccessor(enclClass) diff --git a/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala b/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala index 90c5ac85167c..f1603db0e5a0 100644 --- a/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala +++ b/compiler/src/dotty/tools/dotc/transform/ReifiedReflect.scala @@ -51,7 +51,7 @@ trait ReifiedReflect: .select(defn.Quotes_reflect_TypeApply_apply) .appliedTo(fn, argTrees) - /** Create tree for `quotes.reflect.Assing(, )` */ + /** Create tree for `quotes.reflect.Assign(, )` */ def Assign(lhs: Tree, rhs: Tree)(using Context) = self.select(defn.Quotes_reflect_Assign) .select(defn.Quotes_reflect_Assign_apply) diff --git a/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala b/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala index 6dc718ef526b..36a40658ffa5 100644 --- a/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala +++ b/compiler/src/dotty/tools/dotc/transform/SelectStatic.scala @@ -15,7 +15,7 @@ import dotty.tools.dotc.transform.MegaPhase.* * Otherwise, the backend needs to be aware that some qualifiers need to be * dropped. * - * A tranformation similar to what this phase does seems to be performed by + * A transformation similar to what this phase does seems to be performed by * flatten in nsc. * * The side effects of the qualifier of a dropped `Select` is normally diff --git a/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala b/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala index 845210a033c6..f19f97e24c92 100644 --- a/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala @@ -437,7 +437,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context): MirrorSource.reduce(mirroredType) match case Right(msrc) => msrc match case MirrorSource.Singleton(_, tref) => - val singleton = tref.termSymbol // prefer alias name over the orignal name + val singleton = tref.termSymbol // prefer alias name over the original name val singletonPath = tpd.singleton(tref).withSpan(span) if tref.classSymbol.is(Scala2x) then // could be Scala 3 alias of Scala 2 case object. val mirrorType = formal.constrained_& { diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index ecbcb7b2efda..497a8cc454aa 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -1093,7 +1093,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer * For example, both `@Annot(5)` and `@Annot({5, 6}) are viable calls of the constructor * of annotation defined as `@interface Annot { int[] value() }` * We assume that calling `typedNamedArg` in context of Java implies that we are dealing - * with annotation contructor, as named arguments are not allowed anywhere else in Java. + * with annotation constructor, as named arguments are not allowed anywhere else in Java. * Under explicit nulls, the pt could be nullable. We need to strip `Null` type first. */ val arg1 = pt.stripNull match { diff --git a/docs/_docs/contributing/architecture/phases.md b/docs/_docs/contributing/architecture/phases.md index 844ae144dddb..e5c4b1487a8c 100644 --- a/docs/_docs/contributing/architecture/phases.md +++ b/docs/_docs/contributing/architecture/phases.md @@ -63,7 +63,7 @@ Finally are [staging], which ensures that quotes conform to the trees to embedded TASTy strings. ### `transformPhases` -These phases are concerned with tranformation into lower-level forms +These phases are concerned with transformation into lower-level forms suitable for the runtime system, with two sub-groupings: - High-level transformations: All phases from [firstTransform] to [erasure]. Most of these phases transform syntax trees, expanding high-level constructs diff --git a/docs/_docs/internals/overall-structure.md b/docs/_docs/internals/overall-structure.md index ab936ddd8512..9a1f67ec0067 100644 --- a/docs/_docs/internals/overall-structure.md +++ b/docs/_docs/internals/overall-structure.md @@ -160,7 +160,7 @@ phases. The current list of phases is specified in class [Compiler] as follows: new LetOverApply, // Lift blocks from receivers of applications new ArrayConstructors) :: // Intercept creation of (non-generic) arrays and intrinsify. List(new Erasure) :: // Rewrite types to JVM model, erasing all type parameters, abstract types and refinements. - List(new ElimErasedValueType, // Expand erased value types to their underlying implmementation types + List(new ElimErasedValueType, // Expand erased value types to their underlying implementation types new PureStats, // Remove pure stats from blocks new VCElideAllocations, // Peep-hole optimization to eliminate unnecessary value class allocations new ArrayApply, // Optimize `scala.Array.apply([....])` and `scala.Array.apply(..., [....])` into `[...]` diff --git a/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionArgSuite.scala b/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionArgSuite.scala index f4bfc806dbb3..210a28f6a7a1 100644 --- a/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionArgSuite.scala +++ b/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionArgSuite.scala @@ -583,7 +583,7 @@ class CompletionArgSuite extends BaseCompletionSuite: |""".stripMargin ) - @Test def `contructor-param` = + @Test def `constructor-param` = check( """|class Foo (xxx: Int) | @@ -595,7 +595,7 @@ class CompletionArgSuite extends BaseCompletionSuite: |""".stripMargin ) - @Test def `contructor-param2` = + @Test def `constructor-param2` = check( """|class Foo () | diff --git a/scaladoc/src/dotty/tools/scaladoc/tasty/BasicSupport.scala b/scaladoc/src/dotty/tools/scaladoc/tasty/BasicSupport.scala index 471d338522f0..a5e32c7332bd 100644 --- a/scaladoc/src/dotty/tools/scaladoc/tasty/BasicSupport.scala +++ b/scaladoc/src/dotty/tools/scaladoc/tasty/BasicSupport.scala @@ -48,7 +48,7 @@ trait BasicSupport: "scala.transient", "scala.volatile", "scala.annotation.experimental", - "scala.annotation.contructorOnly", + "scala.annotation.constructorOnly", "scala.annotation.static", "scala.annotation.targetName", "scala.annotation.threadUnsafe", diff --git a/tests/old-tasty-interpreter-prototype/interpreter/TreeInterpreter.scala b/tests/old-tasty-interpreter-prototype/interpreter/TreeInterpreter.scala index a76379e22313..7d43463cd569 100644 --- a/tests/old-tasty-interpreter-prototype/interpreter/TreeInterpreter.scala +++ b/tests/old-tasty-interpreter-prototype/interpreter/TreeInterpreter.scala @@ -146,7 +146,7 @@ abstract class TreeInterpreter[Q <: Quotes & Singleton](using val q: Q) { } case Assign(lhs, rhs) => - log("", tree)(localValue(lhs.symbol).update(eval(rhs))) + log("", tree)(localValue(lhs.symbol).update(eval(rhs))) case If(cond, thenp, elsep) => log("interpretIf", tree)(interpretIf(cond, thenp, elsep)) case While(cond, body) => log("interpretWhile", tree)(interpretWhile(cond, body)) diff --git a/tests/pos-with-compiler-cc/dotc/CompilationUnit.scala b/tests/pos-with-compiler-cc/dotc/CompilationUnit.scala index f70bda947129..ad51305d5858 100644 --- a/tests/pos-with-compiler-cc/dotc/CompilationUnit.scala +++ b/tests/pos-with-compiler-cc/dotc/CompilationUnit.scala @@ -66,7 +66,7 @@ class CompilationUnit protected (val source: SourceFile) { /** Can this compilation unit be suspended */ def isSuspendable: Boolean = true - /** Suspends the compilation unit by thowing a SuspendException + /** Suspends the compilation unit by throwing a SuspendException * and recording the suspended compilation unit */ def suspend()(using Context): Nothing = diff --git a/tests/pos-with-compiler-cc/dotc/Compiler.scala b/tests/pos-with-compiler-cc/dotc/Compiler.scala index b121a47781e1..c8c95647b5e4 100644 --- a/tests/pos-with-compiler-cc/dotc/Compiler.scala +++ b/tests/pos-with-compiler-cc/dotc/Compiler.scala @@ -107,7 +107,7 @@ class Compiler { new LetOverApply, // Lift blocks from receivers of applications new ArrayConstructors) :: // Intercept creation of (non-generic) arrays and intrinsify. List(new Erasure) :: // Rewrite types to JVM model, erasing all type parameters, abstract types and refinements. - List(new ElimErasedValueType, // Expand erased value types to their underlying implmementation types + List(new ElimErasedValueType, // Expand erased value types to their underlying implementation types new PureStats, // Remove pure stats from blocks new VCElideAllocations, // Peep-hole optimization to eliminate unnecessary value class allocations new EtaReduce, // Reduce eta expansions of pure paths to the underlying function reference diff --git a/tests/pos-with-compiler-cc/dotc/config/Config.scala b/tests/pos-with-compiler-cc/dotc/config/Config.scala index cbd50429492e..02d075c8853d 100644 --- a/tests/pos-with-compiler-cc/dotc/config/Config.scala +++ b/tests/pos-with-compiler-cc/dotc/config/Config.scala @@ -248,7 +248,7 @@ object Config { */ inline val printCaptureSetsAsPrefix = true - /** If true, allow mappping capture set variables under captureChecking with maps that are neither + /** If true, allow mapping capture set variables under captureChecking with maps that are neither * bijective nor idempotent. We currently do now know how to do this correctly in all * cases, though. */ diff --git a/tests/pos-with-compiler-cc/dotc/core/Contexts.scala b/tests/pos-with-compiler-cc/dotc/core/Contexts.scala index 37fde2d7b604..a2389a28e941 100644 --- a/tests/pos-with-compiler-cc/dotc/core/Contexts.scala +++ b/tests/pos-with-compiler-cc/dotc/core/Contexts.scala @@ -252,7 +252,7 @@ object Contexts { /** SourceFile with given path, memoized */ def getSource(path: String): SourceFile = getSource(path.toTermName) - /** AbstraFile with given path name, memoized */ + /** AbstractFile with given path name, memoized */ def getFile(name: TermName): AbstractFile = base.files.get(name) match case Some(file) => file diff --git a/tests/pos-with-compiler-cc/dotc/core/tasty/CommentPickler.scala b/tests/pos-with-compiler-cc/dotc/core/tasty/CommentPickler.scala index df3e4df497f8..a49e3b066c62 100644 --- a/tests/pos-with-compiler-cc/dotc/core/tasty/CommentPickler.scala +++ b/tests/pos-with-compiler-cc/dotc/core/tasty/CommentPickler.scala @@ -27,7 +27,7 @@ class CommentPickler(pickler: TastyPickler, addrOfTree: tpd.Tree => Addr, docStr private def traverse(x: Any): Unit = x match case x: untpd.Tree @unchecked => x match - case x: tpd.MemberDef @unchecked => // at this point all MembderDefs are t(y)p(e)d. + case x: tpd.MemberDef @unchecked => // at this point all MemberDefs are t(y)p(e)d. for comment <- docString(x) do pickleComment(addrOfTree(x), comment) case _ => val limit = x.productArity diff --git a/tests/pos-with-compiler-cc/dotc/parsing/Scanners.scala b/tests/pos-with-compiler-cc/dotc/parsing/Scanners.scala index 90c11e4430ec..7fce184cbbec 100644 --- a/tests/pos-with-compiler-cc/dotc/parsing/Scanners.scala +++ b/tests/pos-with-compiler-cc/dotc/parsing/Scanners.scala @@ -667,7 +667,7 @@ object Scanners { if !r.isOutermost && closingRegionTokens.contains(token) && !(token == CASE && r.prefix == MATCH) - && next.token == EMPTY // can be violated for ill-formed programs, e.g. neg/i12605.sala + && next.token == EMPTY // can be violated for ill-formed programs, e.g. neg/i12605.scala => insert(OUTDENT, offset) case _ => diff --git a/tests/pos-with-compiler-cc/dotc/transform/CtxLazy.scala b/tests/pos-with-compiler-cc/dotc/transform/CtxLazy.scala index 808cf928ecc2..e3eb74cbfe9c 100644 --- a/tests/pos-with-compiler-cc/dotc/transform/CtxLazy.scala +++ b/tests/pos-with-compiler-cc/dotc/transform/CtxLazy.scala @@ -9,7 +9,7 @@ import core.Contexts._ * with a different context. * * A typical use case is a lazy val in a phase object which exists once per root context where - * the expression intiializing the lazy val depends only on the root context, but not any changes afterwards. + * the expression initializing the lazy val depends only on the root context, but not any changes afterwards. */ class CtxLazy[T](expr: Context ?=> T) { private var myValue: T = _ diff --git a/tests/pos-with-compiler-cc/dotc/transform/ElimErasedValueType.scala b/tests/pos-with-compiler-cc/dotc/transform/ElimErasedValueType.scala index 2643aa147734..f4310adb6f3d 100644 --- a/tests/pos-with-compiler-cc/dotc/transform/ElimErasedValueType.scala +++ b/tests/pos-with-compiler-cc/dotc/transform/ElimErasedValueType.scala @@ -13,7 +13,7 @@ import NameKinds.SuperAccessorName object ElimErasedValueType { val name: String = "elimErasedValueType" - val description: String = "expand erased value types to their underlying implmementation types" + val description: String = "expand erased value types to their underlying implementation types" def elimEVT(tp: Type)(using Context): Type = tp match { case ErasedValueType(_, underlying) => diff --git a/tests/pos-with-compiler-cc/dotc/transform/ExpandSAMs.scala b/tests/pos-with-compiler-cc/dotc/transform/ExpandSAMs.scala index 0552fe31f8a2..6bbc1cdfdf37 100644 --- a/tests/pos-with-compiler-cc/dotc/transform/ExpandSAMs.scala +++ b/tests/pos-with-compiler-cc/dotc/transform/ExpandSAMs.scala @@ -88,7 +88,7 @@ class ExpandSAMs extends MiniPhase: * } * ``` * - * is expanded to an anomymous class: + * is expanded to an anonymous class: * * ``` * val x: PartialFunction[A, B] = { diff --git a/tests/pos-with-compiler-cc/dotc/transform/ExplicitOuter.scala b/tests/pos-with-compiler-cc/dotc/transform/ExplicitOuter.scala index 539002590e6a..2eda974e0ef2 100644 --- a/tests/pos-with-compiler-cc/dotc/transform/ExplicitOuter.scala +++ b/tests/pos-with-compiler-cc/dotc/transform/ExplicitOuter.scala @@ -100,7 +100,7 @@ class ExplicitOuter extends MiniPhase with InfoTransformer { thisPhase => val parentCls = parent.tpe.classSymbol.asClass parent match // if we are in a regular class and first parent is also a regular class, - // make sure we have a contructor + // make sure we have a constructor case parent: TypeTree if !cls.is(Trait) && !parentCls.is(Trait) && !defn.NotRuntimeClasses.contains(parentCls) => New(parent.tpe, Nil).withSpan(impl.span) @@ -459,7 +459,7 @@ object ExplicitOuter { val enclClass = ctx.owner.lexicallyEnclosingClass.asClass val outerAcc = atPhaseNoLater(lambdaLiftPhase) { // lambdalift mangles local class names, which means we cannot - // reliably find outer acessors anymore + // reliably find outer accessors anymore tree match case tree: This if tree.symbol == enclClass && !enclClass.is(Trait) => outerParamAccessor(enclClass) diff --git a/tests/pos-with-compiler-cc/dotc/transform/ReifiedReflect.scala b/tests/pos-with-compiler-cc/dotc/transform/ReifiedReflect.scala index e462f82b1dad..0882247df8a6 100644 --- a/tests/pos-with-compiler-cc/dotc/transform/ReifiedReflect.scala +++ b/tests/pos-with-compiler-cc/dotc/transform/ReifiedReflect.scala @@ -52,7 +52,7 @@ trait ReifiedReflect: .select(defn.Quotes_reflect_TypeApply_apply) .appliedTo(fn, argTrees) - /** Create tree for `quotes.reflect.Assing(, )` */ + /** Create tree for `quotes.reflect.Assign(, )` */ def Assign(lhs: Tree, rhs: Tree)(using Context) = self.select(defn.Quotes_reflect_Assign) .select(defn.Quotes_reflect_Assign_apply) diff --git a/tests/pos-with-compiler-cc/dotc/transform/SelectStatic.scala b/tests/pos-with-compiler-cc/dotc/transform/SelectStatic.scala index 1df9809c2f62..bffa743fdb88 100644 --- a/tests/pos-with-compiler-cc/dotc/transform/SelectStatic.scala +++ b/tests/pos-with-compiler-cc/dotc/transform/SelectStatic.scala @@ -15,7 +15,7 @@ import dotty.tools.dotc.transform.SymUtils._ * Otherwise, the backend needs to be aware that some qualifiers need to be * dropped. * - * A tranformation similar to what this phase does seems to be performed by + * A transformation similar to what this phase does seems to be performed by * flatten in nsc. * * The side effects of the qualifier of a dropped `Select` is normally diff --git a/tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala b/tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala index 034b9c4b0044..9be40e645726 100644 --- a/tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala +++ b/tests/pos-with-compiler-cc/dotc/typer/Synthesizer.scala @@ -431,7 +431,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context): MirrorSource.reduce(mirroredType) match case Right(msrc) => msrc match case MirrorSource.Singleton(_, tref) => - val singleton = tref.termSymbol // prefer alias name over the orignal name + val singleton = tref.termSymbol // prefer alias name over the original name val singletonPath = pathFor(tref).withSpan(span) if tref.classSymbol.is(Scala2x) then // could be Scala 3 alias of Scala 2 case object. val mirrorType = formal.constrained_& { diff --git a/tests/pos-with-compiler-cc/dotc/typer/Typer.scala b/tests/pos-with-compiler-cc/dotc/typer/Typer.scala index 0baae1730f4a..0b3f7d75f6e2 100644 --- a/tests/pos-with-compiler-cc/dotc/typer/Typer.scala +++ b/tests/pos-with-compiler-cc/dotc/typer/Typer.scala @@ -959,7 +959,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer * For example, both `@Annot(5)` and `@Annot({5, 6}) are viable calls of the constructor * of annotation defined as `@interface Annot { int[] value() }` * We assume that calling `typedNamedArg` in context of Java implies that we are dealing - * with annotation contructor, as named arguments are not allowed anywhere else in Java. + * with annotation constructor, as named arguments are not allowed anywhere else in Java. * Under explicit nulls, the pt could be nullable. We need to strip `Null` type first. */ val arg1 = pt.stripNull match { diff --git a/tests/warn/i15503c.scala b/tests/warn/i15503c.scala index e70df10f3140..a813329da89b 100644 --- a/tests/warn/i15503c.scala +++ b/tests/warn/i15503c.scala @@ -32,7 +32,7 @@ class A: def z = g // OK var w = 2 // OK -package foo.test.contructors: +package foo.test.constructors: case class A private (x:Int) // OK class B private (val x: Int) // OK class C private (private val x: Int) // warn