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

Commit 1b25705

Browse files
committed
Merge pull request scala#4587 from janekdb/2.11.x-typos-m-o
Fix 23 typos (m-o)
2 parents 5b80736 + 39ab6a3 commit 1b25705

File tree

18 files changed

+23
-23
lines changed

18 files changed

+23
-23
lines changed

spec/04-basic-declarations-and-definitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ parameters and associate them with their types.
627627
Each value parameter
628628
declaration may optionally define a default argument. The default argument
629629
expression $e$ is type-checked with an expected type $T'$ obtained
630-
by replacing all occurences of the function's type parameters in $T$ by
630+
by replacing all occurrences of the function's type parameters in $T$ by
631631
the undefined type.
632632

633633
For every parameter $p_{i,j}$ with a default argument a method named

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ abstract class BTypes {
648648
* JVMS 4.7.7: the attribute must be present "if and only if it represents a local class
649649
* or an anonymous class" (i.e. not for member classes).
650650
*
651-
* The attribute is mis-named, it should be called "EnclosingClass". It has to be defined for all
651+
* The attribute is misnamed, it should be called "EnclosingClass". It has to be defined for all
652652
* local and anonymous classes, no matter if there is an enclosing method or not. Accordingly, the
653653
* "class" field (see below) must be always defined, while the "method" field may be null.
654654
*
@@ -798,7 +798,7 @@ abstract class BTypes {
798798
* 2. The ClassBType should be built from a classfile, but the class could not be found on the
799799
* compilation classpath.
800800
*
801-
* Note that all ClassBTypes required in a non-optimzied run are built during code generation from
801+
* Note that all ClassBTypes required in a non-optimized run are built during code generation from
802802
* the class symbols referenced by the ASTs, so they have a valid info. Therefore the backend
803803
* often invokes `info.get` (which asserts the info to exist) when reading data from the ClassBType.
804804
*

src/compiler/scala/tools/nsc/reporters/Reporter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class Reporter extends scala.reflect.internal.Reporter {
2020
/** Informational messages. If `!force`, they may be suppressed. */
2121
final def info(pos: Position, msg: String, force: Boolean): Unit = info0(pos, msg, INFO, force)
2222

23-
/** For sending a message which should not be labeled as a warning/error,
23+
/** For sending a message which should not be labelled as a warning/error,
2424
* but also shouldn't require -verbose to be visible.
2525
*/
2626
def echo(msg: String): Unit = info(NoPosition, msg, force = true)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ trait MatchWarnings {
4040
}
4141
}
4242

43-
// Issue better warnings than "unreachable code" when people mis-use
43+
// Issue better warnings than "unreachable code" when people misuse
4444
// variable patterns thinking they bind to existing identifiers.
4545
//
4646
// Possible TODO: more deeply nested variable patterns, like

src/compiler/scala/tools/nsc/typechecker/Contexts.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ object ContextMode {
15371537
final val TypeConstructorAllowed: ContextMode = 1 << 16
15381538

15391539
/** TODO: The "sticky modes" are EXPRmode, PATTERNmode, TYPEmode.
1540-
* To mimick the sticky mode behavior, when captain stickyfingers
1540+
* To mimic the sticky mode behavior, when captain stickyfingers
15411541
* comes around we need to propagate those modes but forget the other
15421542
* context modes which were once mode bits; those being so far the
15431543
* ones listed here.

src/partest-extras/scala/tools/partest/ASMConverters.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ object ASMConverters {
131131
import collection.mutable.{Map => MMap}
132132

133133
/**
134-
* Bytecode is equal modula local variable numbering and label numbering.
134+
* Bytecode is equal modulo local variable numbering and label numbering.
135135
*/
136136
def equivalentBytecode(as: List[Instruction], bs: List[Instruction], varMap: MMap[Int, Int] = MMap(), labelMap: MMap[Int, Int] = MMap()): Boolean = {
137137
def same(v1: Int, v2: Int, m: MMap[Int, Int]) = {

src/reflect/scala/reflect/internal/Types.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ trait Types
918918
def prefixString = trimPrefix(toString) + "#"
919919

920920
/** Convert toString avoiding infinite recursions by cutting off
921-
* after `maxTostringRecursions` recursion levels. Uses `safeToString`
921+
* after `maxToStringRecursions` recursion levels. Uses `safeToString`
922922
* to produce a string on each level.
923923
*/
924924
override final def toString: String = {
@@ -1489,7 +1489,7 @@ trait Types
14891489
} finally {
14901490
if (Statistics.canEnable) Statistics.popTimer(typeOpsStack, start)
14911491
}
1492-
// [Martin] suppressing memo-ization solves the problem with "same type after erasure" errors
1492+
// [Martin] suppressing memoization solves the problem with "same type after erasure" errors
14931493
// when compiling with
14941494
// scalac scala.collection.IterableViewLike.scala scala.collection.IterableLike.scala
14951495
// I have not yet figured out precisely why this is the case.

src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private[internal] trait TypeConstraints {
9999
// a lower bound despite the fact that Nothing is always a lower bound. My current
100100
// supposition is that the side-effecting type constraint accumulation mechanism
101101
// depends on these subtype tests being performed to make forward progress when
102-
// there are mutally recursive type vars.
102+
// there are mutually recursive type vars.
103103
// See pos/t6367 and pos/t6499 for the competing test cases.
104104
val mustConsider = tp.typeSymbol match {
105105
case NothingClass => true

src/reflect/scala/reflect/macros/FrontEnds.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ package macros
1212
trait FrontEnds {
1313
self: blackbox.Context =>
1414

15-
/** For sending a message which should not be labeled as a warning/error,
15+
/** For sending a message which should not be labelled as a warning/error,
1616
* but also shouldn't require -verbose to be visible.
1717
* Use `enclosingPosition` if you're in doubt what position to pass to `pos`.
1818
*/

test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SeqCoder(words: List[String]) {
1616
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
1717
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
1818

19-
/** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
19+
/** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
2020
private val charCode: Map[Char, Char] =
2121
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
2222

@@ -63,7 +63,7 @@ class ParCoder(words: List[String]) {
6363
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
6464
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
6565

66-
/** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
66+
/** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
6767
private val charCode: Map[Char, Char] =
6868
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
6969

test/disabled/coder/Coder.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class SeqCoder(words: List[String]) {
1010
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
1111
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
1212

13-
/** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
13+
/** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
1414
private val charCode: Map[Char, Char] =
1515
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
1616

@@ -65,7 +65,7 @@ class ParCoder(words: List[String]) {
6565
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
6666
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
6767

68-
/** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
68+
/** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
6969
private val charCode: Map[Char, Char] =
7070
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
7171

test/disabled/run/coder2/Coder2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class SeqCoder(words: List[String]) {
1010
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
1111
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
1212

13-
/** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
13+
/** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
1414
private val charCode: Map[Char, Char] =
1515
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
1616

test/files/neg/t836.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ abstract class A {
1212
class B extends A {
1313
type MyObj = ObjImpl
1414
val myString: S = "hello"
15-
val realString: String = myString // error: type missmatch
15+
val realString: String = myString // error: type mismatch
1616
}

test/files/neg/warn-unused-privates.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class B3(msg0: String) extends A("msg")
2121

2222
/*** Early defs warnings disabled primarily due to SI-6595.
2323
* The test case is here to assure we aren't issuing false positives;
24-
* the ones labeled "warn" don't warn.
24+
* the ones labelled "warn" don't warn.
2525
***/
2626
class Boppy extends {
2727
private val hmm: String = "abc" // no warn, used in early defs

test/files/run/ReplacementMatching.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ object Test {
3232

3333
def groupsMatching {
3434
val Date = """(\d+)/(\d+)/(\d+)""".r
35-
for (Regex.Groups(a, b, c) <- Date findFirstMatchIn "1/1/2001 marks the start of the millenium. 31/12/2000 doesn't.") {
35+
for (Regex.Groups(a, b, c) <- Date findFirstMatchIn "1/1/2001 marks the start of the millennium. 31/12/2000 doesn't.") {
3636
assert(a == "1")
3737
assert(b == "1")
3838
assert(c == "2001")
3939
}
40-
for (Regex.Groups(a, b, c) <- (Date findAllIn "1/1/2001 marks the start of the millenium. 31/12/2000 doesn't.").matchData) {
40+
for (Regex.Groups(a, b, c) <- (Date findAllIn "1/1/2001 marks the start of the millennium. 31/12/2000 doesn't.").matchData) {
4141
assert(a == "1" || a == "31")
4242
assert(b == "1" || b == "12")
4343
assert(c == "2001" || c == "2000")

test/files/run/t6440b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ object Test extends StoreReporterDirectTest {
3535
def app2 = """
3636
package pack3
3737
object Test {
38-
pack2.V.u.t // we have to fail if T.class is misisng
38+
pack2.V.u.t // we have to fail if T.class is missing
3939
}
4040
"""
4141

test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class DirectCompileTest extends ClearAfterClass {
2828
|}
2929
""".stripMargin)
3030
def s(i: Int, n: Int) = (bytes(i) & 0xff) << n
31-
assertTrue((s(0, 24) | s(1, 16) | s(2, 8) | s(3, 0)) == 0xcafebabe) // mocha java latte machiatto surpreme dark roasted espresso
31+
assertTrue((s(0, 24) | s(1, 16) | s(2, 8) | s(3, 0)) == 0xcafebabe) // mocha java latte macchiato surpreme dark roasted espresso
3232
}
3333

3434
@Test

test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class FlatClassPathResolverTest {
4242
// In Java TemporaryFolder in JUnit is managed automatically using @Rule.
4343
// It would work also in Scala after adding and extending a class like
4444
// TestWithTempFolder.java containing it. But in this case it doesn't work when running tests
45-
// from the command line - java class is not compiled due to some, misterious reasons.
45+
// from the command line - java class is not compiled due to some, mysterious reasons.
4646
// That's why such dirs are here created and deleted manually.
4747
tempDir.create()
4848
tempDir.newFile("TestSourceInRootPackage.scala")

0 commit comments

Comments
 (0)