summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/reflect/quasiquotes/Reifiers.scala2
-rwxr-xr-xsrc/compiler/scala/tools/ant/templates/tool-unix.tmpl10
-rw-r--r--src/compiler/scala/tools/nsc/PhaseAssembly.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala8
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala6
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala10
-rw-r--r--src/compiler/scala/tools/nsc/transform/Constructors.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/Delambdafy.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/LazyVals.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/Mixin.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/SampleTransform.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala4
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala8
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
22 files changed, 41 insertions, 43 deletions
diff --git a/src/compiler/scala/reflect/quasiquotes/Reifiers.scala b/src/compiler/scala/reflect/quasiquotes/Reifiers.scala
index 7c0e7dfbb8..e753c9787a 100644
--- a/src/compiler/scala/reflect/quasiquotes/Reifiers.scala
+++ b/src/compiler/scala/reflect/quasiquotes/Reifiers.scala
@@ -317,7 +317,7 @@ trait Reifiers { self: Quasiquotes =>
* Reification of non-trivial list is done in two steps:
*
* 1. split the list into groups where every placeholder is always
- * put in a group of it's own and all subsquent non-holeMap are
+ * put in a group of its own and all subsquent non-holeMap are
* grouped together; element is considered to be a placeholder if it's
* in the domain of the fill function;
*
diff --git a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
index 9862ea7987..6e91a2a202 100755
--- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
@@ -137,8 +137,8 @@ while [[ $# -gt 0 ]]; do
-D*)
# pass to scala as well: otherwise we lose it sometimes when we
# need it, e.g. communicating with a server compiler.
- java_args=("${java_args[@@]}" "$1")
- scala_args=("${scala_args[@@]}" "$1")
+ java_args+=("$1")
+ scala_args+=("$1")
# respect user-supplied -Dscala.usejavacp
case "$1" in -Dscala.usejavacp*) OVERRIDE_USEJAVACP="";; esac
shift
@@ -146,8 +146,8 @@ while [[ $# -gt 0 ]]; do
-J*)
# as with -D, pass to scala even though it will almost
# never be used.
- java_args=("${java_args[@@]}" "${1:2}")
- scala_args=("${scala_args[@@]}" "$1")
+ java_args+=("${1:2}")
+ scala_args+=("$1")
shift
;;
-toolcp)
@@ -167,7 +167,7 @@ while [[ $# -gt 0 ]]; do
shift
;;
*)
- scala_args=("${scala_args[@@]}" "$1")
+ scala_args+=("$1")
shift
;;
esac
diff --git a/src/compiler/scala/tools/nsc/PhaseAssembly.scala b/src/compiler/scala/tools/nsc/PhaseAssembly.scala
index e1cfa63960..4b32aab5ee 100644
--- a/src/compiler/scala/tools/nsc/PhaseAssembly.scala
+++ b/src/compiler/scala/tools/nsc/PhaseAssembly.scala
@@ -127,7 +127,7 @@ trait PhaseAssembly {
}
/* Find all edges in the given graph that are hard links. For each hard link we
- * need to check that its the only dependency. If not, then we will promote the
+ * need to check that it's the only dependency. If not, then we will promote the
* other dependencies down
*/
def validateAndEnforceHardlinks() {
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index 1036dc853b..b76fb3d823 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -1268,7 +1268,7 @@ self =>
atPos(start) { Apply(t3, exprsBuf.toList) }
}
if (inPattern) stringCheese
- else withPlaceholders(stringCheese, isAny = true) // strinterpolator params are Any* by definition
+ else withPlaceholders(stringCheese, isAny = true) // string interpolator params are Any* by definition
}
/* ------------- NEW LINES ------------------------------------------------- */
diff --git a/src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala b/src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala
index 0cdf629ce1..843648282b 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/ICodeCheckers.scala
@@ -109,7 +109,7 @@ abstract class ICodeCheckers {
/** Only called when m1 < m2, so already known that (m1 ne m2).
*/
- private def isConfict(m1: IMember, m2: IMember, canOverload: Boolean) = (
+ private def isConflict(m1: IMember, m2: IMember, canOverload: Boolean) = (
(m1.symbol.name == m2.symbol.name) &&
(!canOverload || (m1.symbol.tpe =:= m2.symbol.tpe))
)
@@ -119,11 +119,11 @@ abstract class ICodeCheckers {
clasz = cls
for (f1 <- cls.fields ; f2 <- cls.fields ; if f1 < f2)
- if (isConfict(f1, f2, canOverload = false))
+ if (isConflict(f1, f2, canOverload = false))
icodeError("Repetitive field name: " + f1.symbol.fullName)
for (m1 <- cls.methods ; m2 <- cls.methods ; if m1 < m2)
- if (isConfict(m1, m2, canOverload = true))
+ if (isConflict(m1, m2, canOverload = true))
icodeError("Repetitive method: " + m1.symbol.fullName)
clasz.methods foreach check
@@ -471,7 +471,7 @@ abstract class ICodeCheckers {
pushStack(local.kind)
case LOAD_FIELD(field, isStatic) =>
- // the symbol's owner should contain it's field, but
+ // the symbol's owner should contain its field, but
// this is already checked by the type checker, no need
// to redo that here
if (isStatic) ()
diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala
index b0ad5bdaf9..058b6a161d 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala
@@ -572,7 +572,7 @@ abstract class TypeFlowAnalysis {
- `inlined` : These blocks were spliced into the method's CFG as part of inlining. Being new blocks, they haven't been visited yet by the typeflow analysis.
- - `staleIn` : These blocks are what `doInline()` calls `afterBlock`s, ie the new home for instructions that previously appearead
+ - `staleIn` : These blocks are what `doInline()` calls `afterBlock`s, ie the new home for instructions that previously appeared
after a callsite in a `staleOut` block.
Based on the above information, we have to bring up-to-date the caches that `forwardAnalysis` and `blockTransfer` use to skip blocks and instructions.
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala
index 162da4236a..eadc404bee 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala
@@ -329,10 +329,12 @@ final class BCodeAsmCommon[G <: Global](val global: G) {
* Build the [[InlineInfo]] for a class symbol.
*/
def buildInlineInfoFromClassSymbol(classSym: Symbol, classSymToInternalName: Symbol => InternalName, methodSymToDescriptor: Symbol => String): InlineInfo = {
- val selfType = {
+ val traitSelfType = if (classSym.isTrait && !classSym.isImplClass) {
// The mixin phase uses typeOfThis for the self parameter in implementation class methods.
val selfSym = classSym.typeOfThis.typeSymbol
if (selfSym != classSym) Some(classSymToInternalName(selfSym)) else None
+ } else {
+ None
}
val isEffectivelyFinal = classSym.isEffectivelyFinal
@@ -394,6 +396,6 @@ final class BCodeAsmCommon[G <: Global](val global: G) {
}
}).toMap
- InlineInfo(selfType, isEffectivelyFinal, methodInlineInfos, warning)
+ InlineInfo(traitSelfType, isEffectivelyFinal, methodInlineInfos, warning)
}
}
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
index d690542f0e..e61190bf3a 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
@@ -315,7 +315,7 @@ abstract class BTypes {
case ArrayBType(component) =>
if (other == ObjectReference || other == jlCloneableReference || other == jioSerializableReference) true
else other match {
- case ArrayBType(otherComponoent) => component.conformsTo(otherComponoent).orThrow
+ case ArrayBType(otherComponent) => component.conformsTo(otherComponent).orThrow
case _ => false
}
diff --git a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
index 3704acb055..1b6631e7a4 100644
--- a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
+++ b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
@@ -173,7 +173,7 @@ abstract class DeadCodeElimination extends SubComponent {
moveToWorkList()
case LOAD_FIELD(sym, isStatic) if isStatic || !inliner.isClosureClass(sym.owner) =>
- // static load may trigger static initization.
+ // static load may trigger static initialization.
// non-static load can throw NPE (but we know closure fields can't be accessed via a
// null reference.
moveToWorkList()
@@ -191,7 +191,7 @@ abstract class DeadCodeElimination extends SubComponent {
case LOAD_EXCEPTION(_) | DUP(_) | LOAD_MODULE(_) => true
case _ =>
dropOf((bb1, idx1)) = (bb,idx) :: dropOf.getOrElse((bb1, idx1), Nil)
- debuglog("DROP is innessential: " + i + " because of: " + bb1(idx1) + " at " + bb1 + ":" + idx1)
+ debuglog("DROP is inessential: " + i + " because of: " + bb1(idx1) + " at " + bb1 + ":" + idx1)
false
}
}
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index 994bcd8359..a59b9d3f48 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -1141,16 +1141,12 @@ abstract class ClassfileParser {
private def innerSymbol(entry: InnerClassEntry): Symbol = {
val name = entry.originalName.toTypeName
val enclosing = entry.enclosing
- def getMember = (
+ val member = (
if (enclosing == clazz) entry.scope lookup name
else lookupMemberAtTyperPhaseIfPossible(enclosing, name)
)
- getMember
- /* There used to be an assertion that this result is not NoSymbol; changing it to an error
- * revealed it had been going off all the time, but has been swallowed by a catch t: Throwable
- * in Repository.scala. Since it has been accomplishing nothing except misleading anyone who
- * thought it wasn't triggering, I removed it entirely.
- */
+ def newStub = enclosing.newStubSymbol(name, s"Unable to locate class corresponding to inner class entry for $name in owner ${entry.outerName}")
+ member.orElse(newStub)
}
}
diff --git a/src/compiler/scala/tools/nsc/transform/Constructors.scala b/src/compiler/scala/tools/nsc/transform/Constructors.scala
index d0fca12e6a..86685d46de 100644
--- a/src/compiler/scala/tools/nsc/transform/Constructors.scala
+++ b/src/compiler/scala/tools/nsc/transform/Constructors.scala
@@ -315,7 +315,7 @@ abstract class Constructors extends Statics with Transform with ast.TreeDSL {
}
def rewriteDelayedInit() {
- /* XXX This is not corect: remainingConstrStats.nonEmpty excludes too much,
+ /* XXX This is not correct: remainingConstrStats.nonEmpty excludes too much,
* but excluding it includes too much. The constructor sequence being mimicked
* needs to be reproduced with total fidelity.
*
diff --git a/src/compiler/scala/tools/nsc/transform/Delambdafy.scala b/src/compiler/scala/tools/nsc/transform/Delambdafy.scala
index 2d33b35241..45a89ac594 100644
--- a/src/compiler/scala/tools/nsc/transform/Delambdafy.scala
+++ b/src/compiler/scala/tools/nsc/transform/Delambdafy.scala
@@ -77,7 +77,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
// the result of the transformFunction method.
sealed abstract class TransformedFunction
- // A class definition for the lambda, an expression insantiating the lambda class
+ // A class definition for the lambda, an expression instantiating the lambda class
case class DelambdafyAnonClass(lambdaClassDef: ClassDef, newExpr: Tree) extends TransformedFunction
// here's the main entry point of the transform
@@ -86,7 +86,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
case fun @ Function(_, _) =>
transformFunction(fun) match {
case DelambdafyAnonClass(lambdaClassDef, newExpr) =>
- // a lambda beccomes a new class, an instantiation expression
+ // a lambda becomes a new class, an instantiation expression
val pkg = lambdaClassDef.symbol.owner
// we'll add the lambda class to the package later
diff --git a/src/compiler/scala/tools/nsc/transform/LazyVals.scala b/src/compiler/scala/tools/nsc/transform/LazyVals.scala
index 38671ebaae..df622d4d1d 100644
--- a/src/compiler/scala/tools/nsc/transform/LazyVals.scala
+++ b/src/compiler/scala/tools/nsc/transform/LazyVals.scala
@@ -219,7 +219,7 @@ abstract class LazyVals extends Transform with TypingTransformers with ast.TreeD
* l$
* } or
* <rhs> when the lazy value has type Unit (for which there is no field
- * to cache it's value.
+ * to cache its value.
*
* Similarly as for normal lazy val members (see Mixin), the result will be a tree of the form
* { if ((bitmap&n & MASK) == 0) this.l$compute()
diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala
index 408f4466e1..11f9483f77 100644
--- a/src/compiler/scala/tools/nsc/transform/Mixin.scala
+++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala
@@ -26,7 +26,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL {
*/
private val treatedClassInfos = perRunCaches.newMap[Symbol, Type]() withDefaultValue NoType
- /** Map a lazy, mixedin field accessor to it's trait member accessor */
+ /** Map a lazy, mixedin field accessor to its trait member accessor */
private val initializer = perRunCaches.newMap[Symbol, Symbol]()
// --------- helper functions -----------------------------------------------
@@ -886,7 +886,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL {
}
/* Complete lazy field accessors. Applies only to classes,
- * for it's own (non inherited) lazy fields. If 'checkinit'
+ * for its own (non inherited) lazy fields. If 'checkinit'
* is enabled, getters that check for the initialized bit are
* generated, and the class constructor is changed to set the
* initialized bits.
diff --git a/src/compiler/scala/tools/nsc/transform/SampleTransform.scala b/src/compiler/scala/tools/nsc/transform/SampleTransform.scala
index cffb483072..ba303f7c2b 100644
--- a/src/compiler/scala/tools/nsc/transform/SampleTransform.scala
+++ b/src/compiler/scala/tools/nsc/transform/SampleTransform.scala
@@ -27,7 +27,7 @@ abstract class SampleTransform extends Transform {
tree1 match {
case Block(List(), expr) => // a simple optimization
expr
- case Block(defs, sup @ Super(qual, mix)) => // A hypthothetic transformation, which replaces
+ case Block(defs, sup @ Super(qual, mix)) => // A hypothetical transformation, which replaces
// {super} by {super.sample}
treeCopy.Block( // `copy` is the usual lazy tree copier
tree1, defs,
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
index 086512677e..1a24c668ba 100644
--- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
+++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
@@ -610,7 +610,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
exitingSpecialize(sClass setInfo specializedInfoType)
val fullEnv = outerEnv ++ env
- /* Enter 'sym' in the scope of the current specialized class. It's type is
+ /* Enter 'sym' in the scope of the current specialized class. Its type is
* mapped through the active environment, binding type variables to concrete
* types. The existing typeEnv for `sym` is composed with the current active
* environment
@@ -1368,7 +1368,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
)
def specializeCalls(unit: CompilationUnit) = new TypingTransformer(unit) {
- /** Map a specializable method to it's rhs, when not deferred. */
+ /** Map a specializable method to its rhs, when not deferred. */
val body = perRunCaches.newMap[Symbol, Tree]()
/** Map a specializable method to its value parameter symbols. */
diff --git a/src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala b/src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala
index 2c27bdb03a..0574869714 100644
--- a/src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala
@@ -57,7 +57,7 @@ trait AnalyzerPlugins { self: Analyzer =>
* `analyzer.transformed` hash map, indexed by the definition's rhs tree.
*
* NOTE: Invoking the type checker can lead to cyclic reference errors. For instance, if this
- * method is called from the type completer of a recursive method, type checking the mehtod
+ * method is called from the type completer of a recursive method, type checking the method
* rhs will invoke the same completer again. It might be possible to avoid this situation by
* assigning `tpe` to `defTree.symbol` (untested) - the final type computed by this method
* will then be assigned to the definition's symbol by monoTypeCompleter (in Namers).
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index 98289f6a3c..d5a3fba76f 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -167,7 +167,7 @@ trait Contexts { self: Analyzer =>
* afterwards errors are thrown. This is configured in `rootContext`. Additionally, more
* fine grained control is needed based on the kind of error; ambiguity errors are often
* suppressed during exploratory typing, such as determining whether `a == b` in an argument
- * position is an assignment or a named argument, when `Infererencer#isApplicableSafe` type checks
+ * position is an assignment or a named argument, when `Inferencer#isApplicableSafe` type checks
* applications with and without an expected type, or whtn `Typer#tryTypedApply` tries to fit arguments to
* a function type with/without implicit views.
*
@@ -1064,10 +1064,10 @@ trait Contexts { self: Analyzer =>
//
// A type-import-on-demand declaration never causes any other declaration to be shadowed.
//
- // Scala: Bindings of different kinds have a precedence defined on them:
+ // Scala: Bindings of different kinds have a precedence defined on them:
//
- // 1) Definitions and declarations that are local, inherited, or made available by a
- // package clause in the same compilation unit where the definition occurs have
+ // 1) Definitions and declarations that are local, inherited, or made available by a
+ // package clause in the same compilation unit where the definition occurs have
// highest precedence.
// 2) Explicit imports have next highest precedence.
def depthOk(imp: ImportInfo) = (
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index e18b9c10f0..ab6b2a0b9d 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -376,7 +376,7 @@ trait Infer extends Checkable {
}
/** Overload which allocates fresh type vars.
* The other one exists because apparently inferExprInstance needs access to the typevars
- * after the call, and its wasteful to return a tuple and throw it away almost every time.
+ * after the call, and it's wasteful to return a tuple and throw it away almost every time.
*/
private def exprTypeArgs(tparams: List[Symbol], restpe: Type, pt: Type, useWeaklyCompatible: Boolean): List[Type] =
exprTypeArgs(tparams map freshVar, tparams, restpe, pt, useWeaklyCompatible)
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index 24238b8e41..77c49a862a 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -1125,7 +1125,7 @@ trait Namers extends MethodSynthesis {
for (vparam <- vparams) {
if (vparam.tpt.isEmpty) {
val overriddenParamTp = overriddenParams.head.tpe
- // references to type parameteres in overriddenParamTp link to the type skolems, so the
+ // references to type parameters in overriddenParamTp link to the type skolems, so the
// assigned type is consistent with the other / existing parameter types in vparamSymss.
vparam.symbol setInfo overriddenParamTp
vparam.tpt defineType overriddenParamTp setPos vparam.pos.focus
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 5abfbe850f..a3a4c70d1e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -584,7 +584,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
!other.isDeferred && other.isJavaDefined && !sym.enclClass.isSubClass(other.enclClass) && {
// #3622: erasure operates on uncurried types --
// note on passing sym in both cases: only sym.isType is relevant for uncurry.transformInfo
- // !!! erasure.erasure(sym, uncurry.transformInfo(sym, tp)) gives erreneous of inaccessible type - check whether that's still the case!
+ // !!! erasure.erasure(sym, uncurry.transformInfo(sym, tp)) gives erroneous or inaccessible type - check whether that's still the case!
def uncurryAndErase(tp: Type) = erasure.erasure(sym)(uncurry.transformInfo(sym, tp))
val tp1 = uncurryAndErase(clazz.thisType.memberType(sym))
val tp2 = uncurryAndErase(clazz.thisType.memberType(other))
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 010b924ba0..8b792998d4 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -4288,7 +4288,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
val selector1 = atPos(tree.pos.focusStart) { if (arity == 1) ids.head else gen.mkTuple(ids) }
// SI-8120 If we don't duplicate the cases, the original Match node will share trees with ones that
// receive symbols owned by this function. However if, after a silent mode session, we discard
- // this Function and try a different approach (e.g. applying a view to the reciever) we end up
+ // this Function and try a different approach (e.g. applying a view to the receiver) we end up
// with orphaned symbols which blows up far down the pipeline (or can be detected with -Ycheck:typer).
val body = treeCopy.Match(tree, selector1, (cases map duplicateAndKeepPositions).asInstanceOf[List[CaseDef]])
typed1(atPos(tree.pos) { Function(params, body) }, mode, pt)