Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit 7f1336a

Browse files
committed
Merge pull request scala#4571 from janekdb/2.11.x-typos-d-f
Fix 36 typos (d-f)
2 parents a3beeda + 2530699 commit 7f1336a

33 files changed

+36
-36
lines changed

src/compiler/scala/reflect/quasiquotes/Holes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ trait Holes { self: Quasiquotes =>
151151
else None
152152
}
153153

154-
/** Map high-rank unquotee onto an expression that eveluates as a list of given rank.
154+
/** Map high-rank unquotee onto an expression that evaluates as a list of given rank.
155155
*
156156
* All possible combinations of representations are given in the table below:
157157
*

src/compiler/scala/tools/nsc/PhaseAssembly.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ trait PhaseAssembly {
226226
}
227227

228228
/** Given the phases set, will build a dependency graph from the phases set
229-
* Using the aux. method of the DependencyGraph to create nodes and egdes.
229+
* Using the aux. method of the DependencyGraph to create nodes and edges.
230230
*/
231231
private def phasesSetToDepGraph(phsSet: mutable.HashSet[SubComponent]): DependencyGraph = {
232232
val graph = new DependencyGraph()

src/compiler/scala/tools/nsc/backend/icode/GenICode.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ abstract class GenICode extends SubComponent {
10221022
tree match {
10231023
case Literal(Constant(null)) if generatedType == NullReference && expectedType != UNIT =>
10241024
// literal null on the stack (as opposed to a boxed null, see SI-8233),
1025-
// we can bypass `adapt` which would otherwise emitt a redundant [DROP, CONSTANT(null)]
1025+
// we can bypass `adapt` which would otherwise emit a redundant [DROP, CONSTANT(null)]
10261026
// except one case: when expected type is UNIT (unboxed) where we need to emit just a DROP
10271027
case _ =>
10281028
adapt(generatedType, expectedType, resCtx, tree.pos)
@@ -2108,7 +2108,7 @@ abstract class GenICode extends SubComponent {
21082108
/**
21092109
* Represent a label in the current method code. In order
21102110
* to support forward jumps, labels can be created without
2111-
* having a deisgnated target block. They can later be attached
2111+
* having a designated target block. They can later be attached
21122112
* by calling `anchor`.
21132113
*/
21142114
class Label(val symbol: Symbol) {

src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ abstract class TypeFlowAnalysis {
387387
388388
Moreover, it's often the case that the last CALL_METHOD of interest ("of interest" equates to "being tracked in `isOnWatchlist`) isn't the last instruction on the block.
389389
There are cases where the typeflows computed past this `lastInstruction` are needed, and cases when they aren't.
390-
The reasoning behind this decsision is described in `populatePerimeter()`. All `blockTransfer()` needs to do (in order to know at which instruction it can stop)
390+
The reasoning behind this decision is described in `populatePerimeter()`. All `blockTransfer()` needs to do (in order to know at which instruction it can stop)
391391
is querying `isOnPerimeter`.
392392
393393
Upon visiting a CALL_METHOD that's an inlining candidate, the relevant pieces of information about the pre-instruction typestack are collected for future use.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ abstract class BCodeSkelBuilder extends BCodeHelpers {
9090

9191
override def getCurrentCUnit(): CompilationUnit = { cunit }
9292

93-
/* ---------------- helper utils for generating classes and fiels ---------------- */
93+
/* ---------------- helper utils for generating classes and fields ---------------- */
9494

9595
def genPlainClass(cd: ClassDef) {
9696
assert(cnode == null, "GenBCode detected nested methods.")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ class BTypesFromSymbols[G <: Global](val global: G) extends BTypes {
322322
val javaCompatMembers = {
323323
if (linkedClass != NoSymbol && isTopLevelModuleClass(linkedClass))
324324
// phase travel to exitingPickler: this makes sure that memberClassesForInnerClassTable only sees member
325-
// classes, not local classes of the companion module (E in the exmaple) that were lifted by lambdalift.
325+
// classes, not local classes of the companion module (E in the example) that were lifted by lambdalift.
326326
exitingPickler(memberClassesForInnerClassTable(linkedClass))
327327
else
328328
Nil

src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ByteCodeRepository(val classPath: ClassFileLookup[AbstractFile], val isJav
127127
case Nil => Left(failedClasses)
128128
}
129129

130-
// In a MethodInsnNode, the `owner` field may be an array descriptor, for exmple when invoking `clone`. We don't have a method node to return in this case.
130+
// In a MethodInsnNode, the `owner` field may be an array descriptor, for example when invoking `clone`. We don't have a method node to return in this case.
131131
if (ownerInternalNameOrArrayDescriptor.charAt(0) == '[')
132132
Left(MethodNotFound(name, descriptor, ownerInternalNameOrArrayDescriptor, Nil))
133133
else

src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ object LocalOptImpls {
262262
* the same index, but distinct start / end ranges are different variables, they may have not the
263263
* same type or name.
264264
*/
265-
def removeUnusedLocalVariableNodes(method: MethodNode)(fistLocalIndex: Int = parametersSize(method), renumber: Int => Int = identity): Boolean = {
265+
def removeUnusedLocalVariableNodes(method: MethodNode)(firstLocalIndex: Int = parametersSize(method), renumber: Int => Int = identity): Boolean = {
266266
def variableIsUsed(start: AbstractInsnNode, end: LabelNode, varIndex: Int): Boolean = {
267267
start != end && (start match {
268268
case v: VarInsnNode if v.`var` == varIndex => true
@@ -276,7 +276,7 @@ object LocalOptImpls {
276276
val local = localsIter.next()
277277
val index = local.index
278278
// parameters and `this` (the lowest indices, starting at 0) are never removed or renumbered
279-
if (index >= fistLocalIndex) {
279+
if (index >= firstLocalIndex) {
280280
if (!variableIsUsed(local.start, local.end, index)) localsIter.remove()
281281
else if (renumber(index) != index) local.index = renumber(index)
282282
}

src/compiler/scala/tools/nsc/settings/ScalaSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ trait ScalaSettings extends AbsScalaSettings
7676
val implicitConversions = Choice("implicitConversions", "Allow definition of implicit functions called views")
7777
val higherKinds = Choice("higherKinds", "Allow higher-kinded types")
7878
val existentials = Choice("existentials", "Existential types (besides wildcard types) can be written and inferred")
79-
val macros = Choice("experimental.macros", "Allow macro defintion (besides implementation and application)")
79+
val macros = Choice("experimental.macros", "Allow macro definition (besides implementation and application)")
8080
}
8181
val language = {
8282
val description = "Enable or disable language features"

src/compiler/scala/tools/nsc/transform/Delambdafy.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
444444
def adaptAndPostErase(tree: Tree, pt: Type): (Boolean, Tree) = {
445445
val (needsAdapt, adaptedTree) = adapt(tree, pt)
446446
val trans = postErasure.newTransformer(unit)
447-
val postErasedTree = trans.atOwner(currentOwner)(trans.transform(adaptedTree)) // SI-8017 elimnates ErasedValueTypes
447+
val postErasedTree = trans.atOwner(currentOwner)(trans.transform(adaptedTree)) // SI-8017 eliminates ErasedValueTypes
448448
(needsAdapt, postErasedTree)
449449
}
450450

src/compiler/scala/tools/nsc/transform/patmat/Logic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ trait ScalaLogic extends Interface with Logic with TreeAndTypeAnalysis {
510510
def propForEqualsTo(c: Const): Prop = {observed(); symForEqualsTo.getOrElse(c, False)}
511511

512512
// [implementation NOTE: don't access until all potential equalities have been registered using registerEquality]p
513-
/** the information needed to construct the boolean proposition that encods the equality proposition (V = C)
513+
/** the information needed to construct the boolean proposition that encodes the equality proposition (V = C)
514514
*
515515
* that models a type test pattern `_: C` or constant pattern `C`, where the type test gives rise to a TypeConst C,
516516
* and the constant pattern yields a ValueConst C

src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging {
642642
}
643643

644644
// override def apply
645-
// debug.patmat("before fixerupper: "+ xTree)
645+
// debug.patmat("before fixerUpper: "+ xTree)
646646
// currentRun.trackerFactory.snapshot()
647647
// debug.patmat("after fixerupper")
648648
// currentRun.trackerFactory.snapshot()

src/library/scala/collection/immutable/Stream.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ import scala.language.implicitConversions
153153
*
154154
* - The fact that `tail` works at all is of interest. In the definition of
155155
* `fibs` we have an initial `(0, 1, Stream(...))` so `tail` is deterministic.
156-
* If we deinfed `fibs` such that only `0` were concretely known then the act
156+
* If we defined `fibs` such that only `0` were concretely known then the act
157157
* of determining `tail` would require the evaluation of `tail` which would
158158
* cause an infinite recursion and stack overflow. If we define a definition
159159
* where the tail is not initially computable then we're going to have an

src/reflect/scala/reflect/internal/ReificationSupport.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ trait ReificationSupport { self: SymbolTable =>
802802
require(enums.nonEmpty, "enumerators can't be empty")
803803
enums.head match {
804804
case SyntacticValFrom(_, _) =>
805-
case t => throw new IllegalArgumentException(s"$t is not a valid fist enumerator of for loop")
805+
case t => throw new IllegalArgumentException(s"$t is not a valid first enumerator of for loop")
806806
}
807807
enums.tail.foreach {
808808
case SyntacticValEq(_, _) | SyntacticValFrom(_, _) | SyntacticFilter(_) =>

src/scaladoc/scala/tools/nsc/doc/html/page/diagram/DotDiagramGenerator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ class DotDiagramGenerator(settings: doc.Settings, dotRunner: DotRunner) extends
383383
if (dotId.count(_ == '|') == 1) {
384384
val Array(klass, id) = dotId.toString.split("\\|")
385385
/* Sometimes dot "forgets" to add the image -- that's very annoying, but it seems pretty random, and simple
386-
* tests like excute 20K times and diff the output don't trigger the bug -- so it's up to us to place the image
386+
* tests like execute 20K times and diff the output don't trigger the bug -- so it's up to us to place the image
387387
* back in the node */
388388
val kind = getKind(klass)
389389
if (kind != "")

src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) {
478478
override lazy val comment = {
479479
def nonRootTemplate(sym: Symbol): Option[DocTemplateImpl] =
480480
if (sym eq RootPackage) None else findTemplateMaybe(sym)
481-
/* Variable precendence order for implicitly added members: Take the variable defifinitions from ...
481+
/* Variable precendence order for implicitly added members: Take the variable definitions from ...
482482
* 1. the target of the implicit conversion
483483
* 2. the definition template (owner)
484484
* 3. the current template

test/files/jvm/unreachable/Test.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.collection.JavaConverters._
66
object Test extends BytecodeTest {
77
def show: Unit = {
88
val classNode = loadClassNode("Foo_1")
9-
// Foo_1 is full of unreachable code which if not elimintated
9+
// Foo_1 is full of unreachable code which if not eliminated
1010
// will result in NOPs as can be confirmed by adding -Ydisable-unreachable-prevention
1111
// to Foo_1.flags
1212
for (methodNode <- classNode.methods.asScala) {

test/files/neg/t3995.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ object Test {
2727
// can be accessed with unambiguous stable prefixes, the implicits infos
2828
// which are members of these companion objects."
2929
//
30-
// The skolem is stable, but it doen't seem much good to us
30+
// The skolem is stable, but it does not seem much good to us
3131
(new Lift).apply("")
3232
}

test/files/neg/t8237-default.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This test case was extracte from `names-defaults-neg.scala`
1+
// This test case was extracted from `names-defaults-neg.scala`
22
// It pinpoints an improvement an error message that results from
33
// a type inference failure
44
object Test extends App {

test/files/neg/t8463.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ object Test {
77

88
/* If SI-8230 is fixed, and `viewExists` is changed to no longer leak
99
ambiguity errors, you might expect the check file for this test to
10-
change as folloes:
10+
change as follows:
1111
1212
@@ -1,18 +1,10 @@
1313
-t8463.scala:5: error: no type parameters for method apply: (activity:

test/files/pos/SI-4012-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ object Sub extends Super[Int] {
66
// it is expected that super[Super].superb crashes, since
77
// specialization does parent class rewiring, and the super
88
// of Sub becomes Super$mcII$sp and not Super. But I consider
9-
// this normal behavior -- if you want, I can modify duplicatiors
9+
// this normal behavior -- if you want, I can modify duplicators
1010
// to make this work, but I consider it's best to keep this
1111
// let the user know Super is not the superclass anymore.
1212
// super[Super].superb - Vlad

test/files/pos/delambdafy-patterns.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class DelambdafyPatterns {
22
def bar: Unit = ()
33
def wildcardPatternInTryCatch: Unit => Unit = (x: Unit) =>
44
// patterns in try..catch are preserved so we need to be
5-
// careful when it comes to free variable detction
5+
// careful when it comes to free variable detection
66
// in particular a is _not_ free variable, also the
77
// `_` identifier has no symbol attached to it
88
try bar catch {

test/files/pos/t7200b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ trait Foo {
1010
object O extends Foo {
1111
def coflatMap[A <: T](f: A) = {
1212
val f2 = coflatMap(f) // inferred in 2.9.2 / 2.10.0 as [Nothing]
13-
f2.t // so this does't type check.
13+
f2.t // so this fails to type check.
1414
f2
1515
}
1616
}

test/files/run/deeps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//############################################################################
44

55
//############################################################################
6-
// need to revisit array equqality
6+
// need to revisit array equality
77
object Test {
88

99
def testEquals1 {

test/files/run/finally.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ object Test extends App {
9393
}
9494
}
9595

96-
// nested finallies with return value
96+
// nested finally blocks with return value
9797
def nestedFinalies: Int =
9898
try {
9999
try {

test/files/run/iq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ object iq {
6969
val (_, q7) = q6.dequeue
7070
//val q8 = q7 + 10 + 11 //deprecated
7171
val q8 = q7.enqueue(10).enqueue(11)
72-
/* Test dequeu
72+
/* Test dequeue
7373
* Expected: q8: Queue(2,3,4,5,6,7,8,9,10,11)
7474
*/
7575
Console.println("q8: " + q8)

test/files/run/names-defaults.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ object Test extends App {
8686
def f(a: Object) = "first"
8787
val f: String => String = a => "second"
8888
}
89-
println(t5.f(new Sub1())) // firsst
89+
println(t5.f(new Sub1())) // first
9090
println(t5.f("dfklj")) // second
9191

9292
object t6 {

test/files/run/nullable-lazyvals.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object Test extends App {
2424

2525
// test that try-finally does not generated a liftedTry
2626
// helper. This would already fail the first part of the test,
27-
// but this check will help diganose it (if the single access to a
27+
// but this check will help diagnose it (if the single access to a
2828
// private field does not happen directly in the lazy val, it won't
2929
// be nulled).
3030
for (f <- foo.getClass.getDeclaredMethods) {

test/files/run/t6240-universe-code-gen.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ object Test extends App {
1313
(sym.isMethod && sym.asMethod.isLazy)
1414
|| sym.isModule
1515
)
16-
val forcables = tp.members.sorted.filter(isLazyAccessorOrObject)
17-
forcables.map {
16+
val forceables = tp.members.sorted.filter(isLazyAccessorOrObject)
17+
forceables.map {
1818
sym =>
1919
val path = s"$prefix.${sym.name}"
2020
" " + (

test/files/run/t8601-closure-elim.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object Test extends BytecodeTest {
1111
val classNode = loadClassNode("Foo")
1212
val methodNode = getMethod(classNode, "b")
1313
val ops = methodNode.instructions.iterator.asScala.map(_.getOpcode).toList
14-
assert(!ops.contains(asm.Opcodes.NEW), ops)// should be allocation free if the closure is eliminiated
14+
assert(!ops.contains(asm.Opcodes.NEW), ops)// should be allocation free if the closure is eliminated
1515
}
1616
test("b")
1717
}

test/files/run/t8708_b/Test_2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ object Test extends DirectTest {
1313
val c = g.rootMirror.getRequiredClass("p.C")
1414
println(c.info.decls)
1515
val t = c.info.member(g.newTypeName("T"))
16-
// this test ensrues that the <local child> dummy class symbol is not entered in the
16+
// this test ensures that the <local child> dummy class symbol is not entered in the
1717
// scope of trait T during unpickling.
1818
println(t.info.decls)
1919
})

test/files/specialized/constant_lambda.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// during development of late delmabdafying there was a problem where
1+
// during development of late delambdafying there was a problem where
22
// specialization would undo some of the work done in uncurry if the body of the
33
// lambda had a constant type. That would result in a compiler crash as
44
// when the delambdafy phase got a tree shape it didn't understand

test/scaladoc/run/groups.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ object Test extends ScaladocModelTest {
3838
* @groupdesc C Group C is introduced by B
3939
*/
4040
trait B {
41-
/** baz descriptopn
41+
/** baz description
4242
* @group C */
4343
def baz = 3
4444
}

0 commit comments

Comments
 (0)