From 549dc880c5525e3a2f3ea6af35c7ae8a349b2bdc Mon Sep 17 00:00:00 2001 From: mpociecha Date: Sat, 13 Dec 2014 16:57:54 +0100 Subject: Fix many typos in docs and comments This commit corrects many typos found in scaladocs, comments and documentation. It should reduce a bit number of PRs which fix one typo. There are no changes in the 'real' code except one corrected name of a JUnit test method and some error messages in exceptions. In the case of typos in other method or field names etc., I just skipped them. Obviously this commit doesn't fix all existing typos. I just generated in IntelliJ the list of potential typos and looked through it quickly. --- .../src/scala/collection/parallel/benchmarks/Bench.scala | 2 +- test/files/neg/literate_existentials.scala | 2 +- test/files/neg/structural.scala | 10 +++++----- test/files/pos/t4070.scala | 2 +- test/files/pos/t8828.scala | 2 +- test/files/presentation/visibility/src/Completions.scala | 4 ++-- test/files/run/applydynamic_sip.scala | 2 +- test/files/run/t5313.scala | 2 +- test/files/run/t6114.scala | 2 +- test/files/run/t8253.scala | 2 +- .../parallel-collections/ParallelIterableCheck.scala | 2 +- test/instrumented/library/scala/runtime/ScalaRunTime.scala | 2 +- test/junit/scala/collection/TraversableOnceTest.scala | 8 ++++---- .../scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala | 2 +- test/junit/scala/tools/nsc/symtab/StdNamesTest.scala | 2 +- test/pending/jvm/cf-attributes.scala | 2 +- test/pending/jvm/timeout.scala | 2 +- test/scaladoc/resources/SI-3314-diagrams.scala | 2 +- test/scaladoc/resources/implicit-inheritance-override.scala | 2 +- test/scaladoc/resources/implicits-ambiguating-res.scala | 2 +- test/scaladoc/resources/implicits-shadowing-res.scala | 2 +- test/scaladoc/scalacheck/HtmlFactoryTest.scala | 2 +- 22 files changed, 30 insertions(+), 30 deletions(-) (limited to 'test') diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/Bench.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/Bench.scala index e8dfe0ac50..c20bbaeef1 100644 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/Bench.scala +++ b/test/benchmarks/src/scala/collection/parallel/benchmarks/Bench.scala @@ -78,7 +78,7 @@ trait Bench extends Benchmark { } /** - * Prints results of the benchmark. May be overidden in benchmarks. + * Prints results of the benchmark. May be overridden in benchmarks. */ def printResults {} diff --git a/test/files/neg/literate_existentials.scala b/test/files/neg/literate_existentials.scala index 8580347bf9..5537c50b3a 100644 --- a/test/files/neg/literate_existentials.scala +++ b/test/files/neg/literate_existentials.scala @@ -187,7 +187,7 @@ object LiterateExistentials { // implicitly[Int <:< (M forSome { type M >: Nothing <: String })] // fails -// The preceeding line causes the compiler to generate an error message. +// The preceding line causes the compiler to generate an error message. diff --git a/test/files/neg/structural.scala b/test/files/neg/structural.scala index d783399317..00459676a9 100644 --- a/test/files/neg/structural.scala +++ b/test/files/neg/structural.scala @@ -11,13 +11,13 @@ object Test extends App { def f2[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: B): Object; val x: B }) = x.m[Tata](x.x) //fail def f3[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: C): Object; val x: C }) = x.m[Tata](x.x) //fail def f4[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: D): Object; val x: D }) = x.m[Tata](x.x) //fail - def f5[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: E): Object; val x: Tata }) = x.m[Tata](x.x) //suceed + def f5[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: E): Object; val x: Tata }) = x.m[Tata](x.x) //succeeds - def f6[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): A }) = x.m[Tata](null) //suceed - def f7[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): B }) = x.m[Tata](null) //suceed - def f8[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): C }) = x.m[Tata](null) //suceed + def f6[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): A }) = x.m[Tata](null) //succeeds + def f7[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): B }) = x.m[Tata](null) //succeeds + def f8[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): C }) = x.m[Tata](null) //succeeds def f9[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): D }) = x.m[Tata](null) //fail - def f0[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): E }) = x.m[Tata](null) //suceed + def f0[C <: Object](x: Object{ type D <: Object; def m[E >: Null <: Object](x: Object): E }) = x.m[Tata](null) //succeeds } diff --git a/test/files/pos/t4070.scala b/test/files/pos/t4070.scala index a9777f02ed..11af67a529 100644 --- a/test/files/pos/t4070.scala +++ b/test/files/pos/t4070.scala @@ -20,7 +20,7 @@ package b { /* -// With crash below the clasess: +// With crash below the classes: % scalac -Dscalac.debug.tvar ./a.scala [ create] ?_$1 ( In Foo#crash ) [ setInst] tv[Int] ( In Foo#crash, _$1=tv[Int] ) diff --git a/test/files/pos/t8828.scala b/test/files/pos/t8828.scala index 92092b4dd4..182aba54c0 100644 --- a/test/files/pos/t8828.scala +++ b/test/files/pos/t8828.scala @@ -11,7 +11,7 @@ package inner { } // the trait is sealed and doWork is not - // and cannot be overriden: no warning + // and cannot be overridden: no warning private[outer] sealed trait C { def doWork(a: A): A = a } diff --git a/test/files/presentation/visibility/src/Completions.scala b/test/files/presentation/visibility/src/Completions.scala index 8c07934915..69ec3959ad 100644 --- a/test/files/presentation/visibility/src/Completions.scala +++ b/test/files/presentation/visibility/src/Completions.scala @@ -11,7 +11,7 @@ package accessibility { def secretPublic(): Unit def someTests(other: Foo) { - other./*!*/secretPrivate // should be all but scretThis + other./*!*/secretPrivate // should be all but secretThis this./*!*/secretProtected // should hit five completions } @@ -25,7 +25,7 @@ package accessibility { class UnrelatedClass { def someTests(foo: Foo) { - foo./*!*/ // should list public and protected[accessiblity] + foo./*!*/ // should list public and protected[accessibility] } } diff --git a/test/files/run/applydynamic_sip.scala b/test/files/run/applydynamic_sip.scala index cf918a82ed..47d0c6a303 100644 --- a/test/files/run/applydynamic_sip.scala +++ b/test/files/run/applydynamic_sip.scala @@ -40,7 +40,7 @@ object Test extends App { // qual.sel(arg = a, a2: _*) // qual.sel(arg, arg2 = "a2", a2: _*) - // If qual.sel appears immediately on the left-hand side of an assigment + // If qual.sel appears immediately on the left-hand side of an assignment // qual.updateDynamic(“sel”)(expr) qual.sel = expr diff --git a/test/files/run/t5313.scala b/test/files/run/t5313.scala index 0d7168fa89..7f5af74c3f 100644 --- a/test/files/run/t5313.scala +++ b/test/files/run/t5313.scala @@ -11,7 +11,7 @@ object Test extends IcodeComparison { def bar = { var kept1 = new Object val result = new java.lang.ref.WeakReference(kept1) - kept1 = null // we can't eliminate this assigment because result can observe + kept1 = null // we can't eliminate this assignment because result can observe // when the object has no more references. See SI-5313 kept1 = new Object // but we can eliminate this one because kept1 has already been clobbered var erased2 = null // we can eliminate this store because it's never used diff --git a/test/files/run/t6114.scala b/test/files/run/t6114.scala index cb880ece00..8ad02d5bb2 100644 --- a/test/files/run/t6114.scala +++ b/test/files/run/t6114.scala @@ -51,7 +51,7 @@ object Test extends App { val next = list.asScala ++ List(4,5,6) assert(next != list.asScala) - // Note: Clone is hidden at this level, so no overriden cloning. + // Note: Clone is hidden at this level, so no overridden cloning. } testList diff --git a/test/files/run/t8253.scala b/test/files/run/t8253.scala index c4800b4491..a00d8b91a4 100644 --- a/test/files/run/t8253.scala +++ b/test/files/run/t8253.scala @@ -10,5 +10,5 @@ object Test extends App { show("", q"") // `identity(foo)` used to match the overly permissive match in SymbolXMLBuilder - // which was intented to more specifically match `_root_.scala.xml.Text(...)` + // which was intended to more specifically match `_root_.scala.xml.Text(...)` } diff --git a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala index 774d6f428b..468bcb6dd1 100644 --- a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala +++ b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala @@ -36,7 +36,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col // used to check if constructed collection is valid def checkDataStructureInvariants(orig: Traversable[T], cf: AnyRef) = { - // can be overriden in subclasses + // can be overridden in subclasses true } diff --git a/test/instrumented/library/scala/runtime/ScalaRunTime.scala b/test/instrumented/library/scala/runtime/ScalaRunTime.scala index e474ae737c..6b45a4e9f3 100644 --- a/test/instrumented/library/scala/runtime/ScalaRunTime.scala +++ b/test/instrumented/library/scala/runtime/ScalaRunTime.scala @@ -261,7 +261,7 @@ object ScalaRunTime { * * The primary motivation for this method is to provide a means for * correctly obtaining a String representation of a value, while - * avoiding the pitfalls of naïvely calling toString on said value. + * avoiding the pitfalls of naively calling toString on said value. * In particular, it addresses the fact that (a) toString cannot be * called on null and (b) depending on the apparent type of an * array, toString may or may not print it in a human-readable form. diff --git a/test/junit/scala/collection/TraversableOnceTest.scala b/test/junit/scala/collection/TraversableOnceTest.scala index 56d8312336..196174c199 100644 --- a/test/junit/scala/collection/TraversableOnceTest.scala +++ b/test/junit/scala/collection/TraversableOnceTest.scala @@ -43,8 +43,8 @@ class TraversableOnceTest { def testReturnTheFirstMatch() = { val d = List(1, 2, 3, 4, 5, 6, 7, 8) def f(x: Int) = x % 3; - assert(d.maxBy(f) == 2, "If multiple elements evaluted to the largest value, maxBy should return the first one.") - assert(d.minBy(f) == 3, "If multiple elements evaluted to the largest value, minBy should return the first one.") + assert(d.maxBy(f) == 2, "If multiple elements evaluated to the largest value, maxBy should return the first one.") + assert(d.minBy(f) == 3, "If multiple elements evaluated to the largest value, minBy should return the first one.") } // Make sure it evaluates f no more than list.length times. @@ -56,7 +56,7 @@ class TraversableOnceTest { evaluatedCountOfMaxBy += 1 x * 10 }) - assert(evaluatedCountOfMaxBy == list.length, s"maxBy: should evaluate f only ${list.length} times, but it evaluted $evaluatedCountOfMaxBy times.") + assert(evaluatedCountOfMaxBy == list.length, s"maxBy: should evaluate f only ${list.length} times, but it evaluated $evaluatedCountOfMaxBy times.") var evaluatedCountOfMinBy = 0 @@ -64,7 +64,7 @@ class TraversableOnceTest { evaluatedCountOfMinBy += 1 x * 10 }) - assert(evaluatedCountOfMinBy == list.length, s"minBy: should evaluate f only ${list.length} times, but it evaluted $evaluatedCountOfMinBy times.") + assert(evaluatedCountOfMinBy == list.length, s"minBy: should evaluate f only ${list.length} times, but it evaluated $evaluatedCountOfMinBy times.") } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala index 5b0f0f238a..5430e33d6c 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala @@ -74,7 +74,7 @@ class MethodLevelOpts { """.stripMargin val m = singleMethod(methodOptCompiler)(code) assertTrue(m.handlers.length == 2) - assertSameCode(m.instructions.dropNonOp, // drop line numbers and lables that are only used by line numbers + assertSameCode(m.instructions.dropNonOp, // drop line numbers and labels that are only used by line numbers // one single label left :-) List(Op(ICONST_1), VarOp(ISTORE, 2), Jump(GOTO, Label(20)), Op(POP), Op(ICONST_2), VarOp(ISTORE, 2), Jump(GOTO, Label(20)), VarOp(ASTORE, 3), Op(ICONST_2), Op(IRETURN), Label(20), Op(ICONST_2), Op(IRETURN)) diff --git a/test/junit/scala/tools/nsc/symtab/StdNamesTest.scala b/test/junit/scala/tools/nsc/symtab/StdNamesTest.scala index 524d2e45e0..91f94e09b6 100644 --- a/test/junit/scala/tools/nsc/symtab/StdNamesTest.scala +++ b/test/junit/scala/tools/nsc/symtab/StdNamesTest.scala @@ -19,7 +19,7 @@ class StdNamesTest { } @Test - def testNewTermNameNegativeLenght(): Unit = { + def testNewTermNameNegativeLength(): Unit = { assertEquals(nme.EMPTY, newTermName("foo".toCharArray, 0, -1)) assertEquals(nme.EMPTY, newTermName("foo".toCharArray, 0, 0)) } diff --git a/test/pending/jvm/cf-attributes.scala b/test/pending/jvm/cf-attributes.scala index f4964b63b1..2d08f22d8b 100644 --- a/test/pending/jvm/cf-attributes.scala +++ b/test/pending/jvm/cf-attributes.scala @@ -62,7 +62,7 @@ object anonymousClasses { //InnerClass: // public final #_; //class anonymousClasses$$anon$1 of class anonymousClasses$ val x = new Foo() { - override def foo() { println("foo (overriden)"); } + override def foo() { println("foo (overridden)"); } def dummy = 0 } } diff --git a/test/pending/jvm/timeout.scala b/test/pending/jvm/timeout.scala index 22b3647dce..8f29f8ddbe 100644 --- a/test/pending/jvm/timeout.scala +++ b/test/pending/jvm/timeout.scala @@ -1,4 +1,4 @@ -// Test is in pending because although it suceeds locally, +// Test is in pending because although it succeeds locally, // it takes too long on the machine which runs nightly tests. // // [partest] EXPECTED: 100 < x < 900 diff --git a/test/scaladoc/resources/SI-3314-diagrams.scala b/test/scaladoc/resources/SI-3314-diagrams.scala index b80a97b522..7d2cc9447c 100644 --- a/test/scaladoc/resources/SI-3314-diagrams.scala +++ b/test/scaladoc/resources/SI-3314-diagrams.scala @@ -7,7 +7,7 @@ package scala.test.scaladoc { * / / / | \ \ \ * Mon Tue Wed Thu Fri Sat Sun * - * - each member should receive an inhertiance diagram: + * - each member should receive an inheritance diagram: * Value * | * | diff --git a/test/scaladoc/resources/implicit-inheritance-override.scala b/test/scaladoc/resources/implicit-inheritance-override.scala index 5d692f59ad..b59d2f410d 100644 --- a/test/scaladoc/resources/implicit-inheritance-override.scala +++ b/test/scaladoc/resources/implicit-inheritance-override.scala @@ -35,7 +35,7 @@ class DerivedC extends Base { class DerivedD extends Base { /** - * @tparam T The overriden type parameter comment + * @tparam T The overridden type parameter comment */ override def function[T](arg1: T, arg2: String): Double = 3.0d } \ No newline at end of file diff --git a/test/scaladoc/resources/implicits-ambiguating-res.scala b/test/scaladoc/resources/implicits-ambiguating-res.scala index 6ed51366cb..90e43ac2ed 100644 --- a/test/scaladoc/resources/implicits-ambiguating-res.scala +++ b/test/scaladoc/resources/implicits-ambiguating-res.scala @@ -1,5 +1,5 @@ /** - * Test scaladoc implicits distinguishing -- supress all members by implicit conversion that are shadowed by the + * Test scaladoc implicits distinguishing -- suppress all members by implicit conversion that are shadowed by the * class' own members * * {{{ diff --git a/test/scaladoc/resources/implicits-shadowing-res.scala b/test/scaladoc/resources/implicits-shadowing-res.scala index c5e9493bf3..b7f3ceb895 100644 --- a/test/scaladoc/resources/implicits-shadowing-res.scala +++ b/test/scaladoc/resources/implicits-shadowing-res.scala @@ -1,5 +1,5 @@ /** - * Test scaladoc implicits distinguishing -- supress all members by implicit conversion that are shadowed by the + * Test scaladoc implicits distinguishing -- suppress all members by implicit conversion that are shadowed by the * class' own members * * {{{ diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala index da0f253a37..51633be440 100644 --- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala +++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala @@ -485,7 +485,7 @@ object Test extends Properties("HtmlFactory") { """, true), (Some("DerivedD"), """def function[T](arg1: T, arg2: String): Double - T The overriden type parameter comment + T The overridden type parameter comment arg1 The T term comment arg2 The string comment returns The return comment -- cgit v1.2.3