Skip to content

Commit 773f354

Browse files
committed
fix some typo
1 parent 5374d91 commit 773f354

23 files changed

+38
-38
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
324324
if (!fun.symbol.isStaticMember) {
325325
// load receiver of non-static implementation of lambda
326326

327-
// darkdimius: I haven't found in spec `this` refference should go
327+
// darkdimius: I haven't found in spec `this` reference should go
328328
// but I was able to derrive it by reading
329329
// AbstractValidatingLambdaMetafactory.validateMetafactoryArgs
330330

@@ -1035,7 +1035,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
10351035
(args zip params) filterNot isTrivial
10361036
}
10371037

1038-
// first push *all* arguments. This makes sure muliple uses of the same labelDef-var will all denote the (previous) value.
1038+
// first push *all* arguments. This makes sure multiple uses of the same labelDef-var will all denote the (previous) value.
10391039
aps foreach { case (arg, param) => genLoad(arg, locals(param).tk) } // `locals` is known to contain `param` because `genDefDef()` visited `labelDefsAtOrUnder`
10401040

10411041
// second assign one by one to the LabelDef's variables.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ abstract class BTypes {
445445
* local and anonymous classes, no matter if there is an enclosing method or not. Accordingly, the
446446
* "class" field (see below) must be always defined, while the "method" field may be null.
447447
*
448-
* NOTE: When a EnclosingMethod attribute is requried (local and anonymous classes), the "outer"
448+
* NOTE: When a EnclosingMethod attribute is required (local and anonymous classes), the "outer"
449449
* field in the InnerClass table must be null.
450450
*
451451
* Fields:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import scala.annotation.threadUnsafe
77

88
/**
99
* This class mainly contains the method classBTypeFromSymbol, which extracts the necessary
10-
* information from a symbol and its type to create the correpsonding ClassBType. It requires
10+
* information from a symbol and its type to create the corresponding ClassBType. It requires
1111
* access to the compiler (global parameter).
1212
*
1313
* The mixin CoreBTypes defines core BTypes that are used in the backend. Building these BTypes

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ abstract class BackendInterface extends BackendInterfaceDefinitions {
626626
}
627627

628628
abstract class Primitives {
629-
def getPrimitive(app: Apply, reciever: Type): Int
629+
def getPrimitive(app: Apply, receiver: Type): Int
630630
def isPrimitive(fun: Tree): Boolean
631631
def getPrimitive(sym: Symbol): Int
632632
}
@@ -722,7 +722,7 @@ abstract class BackendInterfaceDefinitions { self: BackendInterface =>
722722
val DoubleClass: Symbol
723723

724724
// Class symbols used in backend.
725-
// Vals becouse they are to frequent in scala programs so that they are already loaded by backend
725+
// Vals because they are to frequent in scala programs so that they are already loaded by backend
726726

727727
lazy val NativeAttr: Symbol = requiredClass[scala.native]
728728
lazy val TransientAttr = requiredClass[scala.transient]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ trait BytecodeWriters {
6767
}
6868

6969
/*
70-
* The ASM textual representation for bytecode overcomes disadvantages of javap ouput in three areas:
70+
* The ASM textual representation for bytecode overcomes disadvantages of javap output in three areas:
7171
* (a) pickle dingbats undecipherable to the naked eye;
7272
* (b) two constant pools, while having identical contents, are displayed differently due to physical layout.
7373
* (c) stack maps (classfile version 50 and up) are displayed in encoded form by javap,

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ object desugar {
859859
* given object name extends parents { self => body' }
860860
*
861861
* where every definition in `body` is expanded to an extension method
862-
* taking type parameters `tparams` and a leading paramter `(x: T)`.
862+
* taking type parameters `tparams` and a leading parameter `(x: T)`.
863863
* See: makeExtensionDef
864864
*/
865865
def moduleDef(mdef: ModuleDef)(implicit ctx: Context): Tree = {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ object JavaNullInterop {
118118
case tp: TypeRef if needsNull(tp) => OrUncheckedNull(tp)
119119
case appTp @ AppliedType(tycon, targs) =>
120120
val oldOutermostNullable = outermostLevelAlreadyNullable
121-
// We don't make the outmost levels of type arguements nullable if tycon is Java-defined.
121+
// We don't make the outmost levels of type arguments nullable if tycon is Java-defined.
122122
// This is because Java classes are _all_ nullified, so both `java.util.List[String]` and
123123
// `java.util.List[String|Null]` contain nullable elements.
124124
outermostLevelAlreadyNullable = tp.classSymbol.is(JavaDefined)

compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ object messages {
3737
) extends MessageContainer(msgFn, pos, ERROR)
3838

3939
/** A sticky error is an error that should not be hidden by backtracking and
40-
* trying some alternative path. Typcially, errors issued after catching
40+
* trying some alternative path. Typically, errors issued after catching
4141
* a TypeError exception are sticky.
4242
*/
4343
class StickyError(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ trait Applications extends Compatibility {
916916
case CaseDef(Bind(_, Typed(_: Ident, _)), _, _) => // OK
917917
case CaseDef(Ident(name), _, _) if name == nme.WILDCARD => // Ok
918918
case CaseDef(pat, _, _) =>
919-
ctx.error("Unexpected pattern for summonFrom. Expeced `x: T` or `_`", pat.sourcePos)
919+
ctx.error("Unexpected pattern for summonFrom. Expected `x: T` or `_`", pat.sourcePos)
920920
}
921921
typed(untpd.InlineMatch(EmptyTree, cases).withSpan(arg.span), pt)
922922
case _ =>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ trait Deriving {
6363
* (1) It must be a class type with a stable prefix (@see checkClassTypeWithStablePrefix)
6464
*
6565
* (2) It must belong to one of the following three categories:
66-
* (a) a single paramter type class with a parameter which matches the kind of
66+
* (a) a single parameter type class with a parameter which matches the kind of
6767
* the deriving ADT
6868
* (b) a single parameter type class with a parameter of kind * and an ADT with
6969
* one or more type parameter of kind *

0 commit comments

Comments
 (0)