summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanek Bogucki <janekdb@gmail.com>2015-06-28 21:32:05 +0100
committerJanek Bogucki <janekdb@gmail.com>2015-06-28 21:32:05 +0100
commit39ab6a3dff800c2e63b3749f44d1ebfbfe86ea8b (patch)
treee542faaab78869f4094935d6248c2134d2a7abf6
parent5b8073676cc77c2c889ed690f12bb6a99e790769 (diff)
downloadscala-39ab6a3dff800c2e63b3749f44d1ebfbfe86ea8b.tar.gz
scala-39ab6a3dff800c2e63b3749f44d1ebfbfe86ea8b.tar.bz2
scala-39ab6a3dff800c2e63b3749f44d1ebfbfe86ea8b.zip
Fix 23 typos (m-o)
-rw-r--r--spec/04-basic-declarations-and-definitions.md2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala4
-rw-r--r--src/compiler/scala/tools/nsc/reporters/Reporter.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala2
-rw-r--r--src/partest-extras/scala/tools/partest/ASMConverters.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Types.scala4
-rw-r--r--src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala2
-rw-r--r--src/reflect/scala/reflect/macros/FrontEnds.scala2
-rw-r--r--test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala4
-rw-r--r--test/disabled/coder/Coder.scala4
-rw-r--r--test/disabled/run/coder2/Coder2.scala2
-rw-r--r--test/files/neg/t836.scala2
-rw-r--r--test/files/neg/warn-unused-privates.scala2
-rw-r--r--test/files/run/ReplacementMatching.scala4
-rw-r--r--test/files/run/t6440b.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala2
18 files changed, 23 insertions, 23 deletions
diff --git a/spec/04-basic-declarations-and-definitions.md b/spec/04-basic-declarations-and-definitions.md
index 8437d2ea71..7790428ca8 100644
--- a/spec/04-basic-declarations-and-definitions.md
+++ b/spec/04-basic-declarations-and-definitions.md
@@ -627,7 +627,7 @@ parameters and associate them with their types.
Each value parameter
declaration may optionally define a default argument. The default argument
expression $e$ is type-checked with an expected type $T'$ obtained
-by replacing all occurences of the function's type parameters in $T$ by
+by replacing all occurrences of the function's type parameters in $T$ by
the undefined type.
For every parameter $p_{i,j}$ with a default argument a method named
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
index 7f0aaa7305..8720da84e8 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala
@@ -648,7 +648,7 @@ abstract class BTypes {
* JVMS 4.7.7: the attribute must be present "if and only if it represents a local class
* or an anonymous class" (i.e. not for member classes).
*
- * The attribute is mis-named, it should be called "EnclosingClass". It has to be defined for all
+ * The attribute is misnamed, it should be called "EnclosingClass". It has to be defined for all
* local and anonymous classes, no matter if there is an enclosing method or not. Accordingly, the
* "class" field (see below) must be always defined, while the "method" field may be null.
*
@@ -798,7 +798,7 @@ abstract class BTypes {
* 2. The ClassBType should be built from a classfile, but the class could not be found on the
* compilation classpath.
*
- * Note that all ClassBTypes required in a non-optimzied run are built during code generation from
+ * Note that all ClassBTypes required in a non-optimized run are built during code generation from
* the class symbols referenced by the ASTs, so they have a valid info. Therefore the backend
* often invokes `info.get` (which asserts the info to exist) when reading data from the ClassBType.
*
diff --git a/src/compiler/scala/tools/nsc/reporters/Reporter.scala b/src/compiler/scala/tools/nsc/reporters/Reporter.scala
index 3d688efae1..bd438f0e75 100644
--- a/src/compiler/scala/tools/nsc/reporters/Reporter.scala
+++ b/src/compiler/scala/tools/nsc/reporters/Reporter.scala
@@ -20,7 +20,7 @@ abstract class Reporter extends scala.reflect.internal.Reporter {
/** Informational messages. If `!force`, they may be suppressed. */
final def info(pos: Position, msg: String, force: Boolean): Unit = info0(pos, msg, INFO, force)
- /** For sending a message which should not be labeled as a warning/error,
+ /** For sending a message which should not be labelled as a warning/error,
* but also shouldn't require -verbose to be visible.
*/
def echo(msg: String): Unit = info(NoPosition, msg, force = true)
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala
index 9e9372f709..8beb1837ad 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchWarnings.scala
@@ -40,7 +40,7 @@ trait MatchWarnings {
}
}
- // Issue better warnings than "unreachable code" when people mis-use
+ // Issue better warnings than "unreachable code" when people misuse
// variable patterns thinking they bind to existing identifiers.
//
// Possible TODO: more deeply nested variable patterns, like
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index 542f58795a..a7ef5d5d2f 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -1537,7 +1537,7 @@ object ContextMode {
final val TypeConstructorAllowed: ContextMode = 1 << 16
/** TODO: The "sticky modes" are EXPRmode, PATTERNmode, TYPEmode.
- * To mimick the sticky mode behavior, when captain stickyfingers
+ * To mimic the sticky mode behavior, when captain stickyfingers
* comes around we need to propagate those modes but forget the other
* context modes which were once mode bits; those being so far the
* ones listed here.
diff --git a/src/partest-extras/scala/tools/partest/ASMConverters.scala b/src/partest-extras/scala/tools/partest/ASMConverters.scala
index f6e2d2a9ec..90f314428b 100644
--- a/src/partest-extras/scala/tools/partest/ASMConverters.scala
+++ b/src/partest-extras/scala/tools/partest/ASMConverters.scala
@@ -131,7 +131,7 @@ object ASMConverters {
import collection.mutable.{Map => MMap}
/**
- * Bytecode is equal modula local variable numbering and label numbering.
+ * Bytecode is equal modulo local variable numbering and label numbering.
*/
def equivalentBytecode(as: List[Instruction], bs: List[Instruction], varMap: MMap[Int, Int] = MMap(), labelMap: MMap[Int, Int] = MMap()): Boolean = {
def same(v1: Int, v2: Int, m: MMap[Int, Int]) = {
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala
index f74d976b82..c760db3864 100644
--- a/src/reflect/scala/reflect/internal/Types.scala
+++ b/src/reflect/scala/reflect/internal/Types.scala
@@ -918,7 +918,7 @@ trait Types
def prefixString = trimPrefix(toString) + "#"
/** Convert toString avoiding infinite recursions by cutting off
- * after `maxTostringRecursions` recursion levels. Uses `safeToString`
+ * after `maxToStringRecursions` recursion levels. Uses `safeToString`
* to produce a string on each level.
*/
override final def toString: String = {
@@ -1489,7 +1489,7 @@ trait Types
} finally {
if (Statistics.canEnable) Statistics.popTimer(typeOpsStack, start)
}
- // [Martin] suppressing memo-ization solves the problem with "same type after erasure" errors
+ // [Martin] suppressing memoization solves the problem with "same type after erasure" errors
// when compiling with
// scalac scala.collection.IterableViewLike.scala scala.collection.IterableLike.scala
// I have not yet figured out precisely why this is the case.
diff --git a/src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala b/src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala
index f79099213a..e321a07f51 100644
--- a/src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala
+++ b/src/reflect/scala/reflect/internal/tpe/TypeConstraints.scala
@@ -99,7 +99,7 @@ private[internal] trait TypeConstraints {
// a lower bound despite the fact that Nothing is always a lower bound. My current
// supposition is that the side-effecting type constraint accumulation mechanism
// depends on these subtype tests being performed to make forward progress when
- // there are mutally recursive type vars.
+ // there are mutually recursive type vars.
// See pos/t6367 and pos/t6499 for the competing test cases.
val mustConsider = tp.typeSymbol match {
case NothingClass => true
diff --git a/src/reflect/scala/reflect/macros/FrontEnds.scala b/src/reflect/scala/reflect/macros/FrontEnds.scala
index a770f325b2..8ad41382a8 100644
--- a/src/reflect/scala/reflect/macros/FrontEnds.scala
+++ b/src/reflect/scala/reflect/macros/FrontEnds.scala
@@ -12,7 +12,7 @@ package macros
trait FrontEnds {
self: blackbox.Context =>
- /** For sending a message which should not be labeled as a warning/error,
+ /** For sending a message which should not be labelled as a warning/error,
* but also shouldn't require -verbose to be visible.
* Use `enclosingPosition` if you're in doubt what position to pass to `pos`.
*/
diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala
index 9cc1f4a0f6..04e37085b8 100644
--- a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala
+++ b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala
@@ -16,7 +16,7 @@ class SeqCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
@@ -63,7 +63,7 @@ class ParCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
diff --git a/test/disabled/coder/Coder.scala b/test/disabled/coder/Coder.scala
index 4e29c2a6ee..62b99e0cf0 100644
--- a/test/disabled/coder/Coder.scala
+++ b/test/disabled/coder/Coder.scala
@@ -10,7 +10,7 @@ class SeqCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
@@ -65,7 +65,7 @@ class ParCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
diff --git a/test/disabled/run/coder2/Coder2.scala b/test/disabled/run/coder2/Coder2.scala
index 43b2e9bcb8..c1ec70b842 100644
--- a/test/disabled/run/coder2/Coder2.scala
+++ b/test/disabled/run/coder2/Coder2.scala
@@ -10,7 +10,7 @@ class SeqCoder(words: List[String]) {
'2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL",
'6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ")
- /** Invert the mnemnonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
+ /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */
private val charCode: Map[Char, Char] =
for ((digit, letters) <- m; letter <- letters) yield letter -> digit
diff --git a/test/files/neg/t836.scala b/test/files/neg/t836.scala
index 3633b816c6..4b86d04013 100644
--- a/test/files/neg/t836.scala
+++ b/test/files/neg/t836.scala
@@ -12,5 +12,5 @@ abstract class A {
class B extends A {
type MyObj = ObjImpl
val myString: S = "hello"
- val realString: String = myString // error: type missmatch
+ val realString: String = myString // error: type mismatch
}
diff --git a/test/files/neg/warn-unused-privates.scala b/test/files/neg/warn-unused-privates.scala
index 2faa07e759..2eda280d40 100644
--- a/test/files/neg/warn-unused-privates.scala
+++ b/test/files/neg/warn-unused-privates.scala
@@ -21,7 +21,7 @@ class B3(msg0: String) extends A("msg")
/*** Early defs warnings disabled primarily due to SI-6595.
* The test case is here to assure we aren't issuing false positives;
- * the ones labeled "warn" don't warn.
+ * the ones labelled "warn" don't warn.
***/
class Boppy extends {
private val hmm: String = "abc" // no warn, used in early defs
diff --git a/test/files/run/ReplacementMatching.scala b/test/files/run/ReplacementMatching.scala
index 05040d98a3..81034aa510 100644
--- a/test/files/run/ReplacementMatching.scala
+++ b/test/files/run/ReplacementMatching.scala
@@ -32,12 +32,12 @@ object Test {
def groupsMatching {
val Date = """(\d+)/(\d+)/(\d+)""".r
- for (Regex.Groups(a, b, c) <- Date findFirstMatchIn "1/1/2001 marks the start of the millenium. 31/12/2000 doesn't.") {
+ for (Regex.Groups(a, b, c) <- Date findFirstMatchIn "1/1/2001 marks the start of the millennium. 31/12/2000 doesn't.") {
assert(a == "1")
assert(b == "1")
assert(c == "2001")
}
- for (Regex.Groups(a, b, c) <- (Date findAllIn "1/1/2001 marks the start of the millenium. 31/12/2000 doesn't.").matchData) {
+ for (Regex.Groups(a, b, c) <- (Date findAllIn "1/1/2001 marks the start of the millennium. 31/12/2000 doesn't.").matchData) {
assert(a == "1" || a == "31")
assert(b == "1" || b == "12")
assert(c == "2001" || c == "2000")
diff --git a/test/files/run/t6440b.scala b/test/files/run/t6440b.scala
index 974aca2844..7ab9529ccb 100644
--- a/test/files/run/t6440b.scala
+++ b/test/files/run/t6440b.scala
@@ -35,7 +35,7 @@ object Test extends StoreReporterDirectTest {
def app2 = """
package pack3
object Test {
- pack2.V.u.t // we have to fail if T.class is misisng
+ pack2.V.u.t // we have to fail if T.class is missing
}
"""
diff --git a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala
index 4086f7dd7b..240d3523f1 100644
--- a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala
+++ b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala
@@ -28,7 +28,7 @@ class DirectCompileTest extends ClearAfterClass {
|}
""".stripMargin)
def s(i: Int, n: Int) = (bytes(i) & 0xff) << n
- assertTrue((s(0, 24) | s(1, 16) | s(2, 8) | s(3, 0)) == 0xcafebabe) // mocha java latte machiatto surpreme dark roasted espresso
+ assertTrue((s(0, 24) | s(1, 16) | s(2, 8) | s(3, 0)) == 0xcafebabe) // mocha java latte macchiato surpreme dark roasted espresso
}
@Test
diff --git a/test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala b/test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala
index a37ba31b31..5dee488285 100644
--- a/test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala
+++ b/test/junit/scala/tools/nsc/classpath/FlatClassPathResolverTest.scala
@@ -42,7 +42,7 @@ class FlatClassPathResolverTest {
// In Java TemporaryFolder in JUnit is managed automatically using @Rule.
// It would work also in Scala after adding and extending a class like
// TestWithTempFolder.java containing it. But in this case it doesn't work when running tests
- // from the command line - java class is not compiled due to some, misterious reasons.
+ // from the command line - java class is not compiled due to some, mysterious reasons.
// That's why such dirs are here created and deleted manually.
tempDir.create()
tempDir.newFile("TestSourceInRootPackage.scala")