From ada9fa0b91ddb64f6d15f7616b455247cbcf2243 Mon Sep 17 00:00:00 2001 From: Janek Bogucki Date: Mon, 22 Jun 2015 23:32:33 +0100 Subject: Fix 25 typos (g-i) --- src/compiler/scala/reflect/quasiquotes/Reifiers.scala | 2 +- src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala | 2 +- src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala | 2 +- src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 2 +- src/compiler/scala/tools/nsc/typechecker/Infer.scala | 2 +- src/compiler/scala/tools/nsc/util/DocStrings.scala | 2 +- src/library/scala/collection/generic/Sorted.scala | 2 +- src/reflect/scala/reflect/api/FlagSets.scala | 2 +- src/reflect/scala/reflect/api/Printers.scala | 2 +- src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala | 2 +- test/files/jvm/javaReflection/Test.scala | 2 +- test/files/jvm/protectedacc.scala | 2 +- test/files/neg/t8431.scala | 2 +- test/files/pos/t8947/Macro_1.scala | 2 +- test/files/run/blame_eye_triple_eee-double.check | 2 +- test/files/run/blame_eye_triple_eee-double.scala | 2 +- test/files/run/blame_eye_triple_eee-float.check | 2 +- test/files/run/blame_eye_triple_eee-float.scala | 2 +- test/files/run/names-defaults.scala | 2 +- test/files/run/t0631.scala | 2 +- test/files/run/t2526.scala | 2 +- test/files/run/t7817-tree-gen.scala | 2 +- test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala | 2 +- test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala | 2 +- test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/compiler/scala/reflect/quasiquotes/Reifiers.scala b/src/compiler/scala/reflect/quasiquotes/Reifiers.scala index e753c9787a..8462debe21 100644 --- a/src/compiler/scala/reflect/quasiquotes/Reifiers.scala +++ b/src/compiler/scala/reflect/quasiquotes/Reifiers.scala @@ -322,7 +322,7 @@ trait Reifiers { self: Quasiquotes => * in the domain of the fill function; * * 2. fold the groups into a sequence of lists added together with ++ using - * fill reification for holeMap and fallback reification for non-holeMap. + * fill reification for holeMap and fallback reification for non-holeMap. * * Example: * diff --git a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala index 1b6631e7a4..8911a3a28c 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala @@ -378,7 +378,7 @@ abstract class DeadCodeElimination extends SubComponent { } else { i match { case NEW(REFERENCE(sym)) => - log(s"Eliminated instantation of $sym inside $m") + log(s"Eliminated instantiation of $sym inside $m") case STORE_LOCAL(l) if clobbers contains ((bb, idx)) => // if an unused instruction was a clobber of a used store to a reference or array type // then we'll replace it with the store of a null to make sure the reference is diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala index ea46116976..438a71061e 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala @@ -599,7 +599,7 @@ abstract class ICodeReader extends ClassfileParser { } case JVM.invokedynamic => // TODO, this is just a place holder. A real implementation must parse the class constant entry - debuglog("Found JVM invokedynamic instructionm, inserting place holder ICode INVOKE_DYNAMIC.") + debuglog("Found JVM invokedynamic instruction, inserting place holder ICode INVOKE_DYNAMIC.") containsInvokeDynamic = true val poolEntry = in.nextChar.toInt in.skip(2) diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index 5ecca5abce..80e06eb8fa 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -985,7 +985,7 @@ trait Implicits { if (implicitInfoss.forall(_.isEmpty)) SearchFailure else new ImplicitComputation(implicitInfoss, isLocalToCallsite) findBest() - /** Produce an implicict info map, i.e. a map from the class symbols C of all parts of this type to + /** Produce an implicit info map, i.e. a map from the class symbols C of all parts of this type to * the implicit infos in the companion objects of these class symbols C. * The parts of a type is the smallest set of types that contains * - the type itself diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index f9582a54ff..ea0a9bb243 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -934,7 +934,7 @@ trait Infer extends Checkable { def infer_s = map3(tparams, tvars, targs)((tparam, tvar, targ) => s"$tparam=$tvar/$targ") mkString "," printTyping(tree, s"infer expr instance from pt=$pt, $infer_s") - // SI-7899 infering by-name types is unsound. The correct behaviour is conditional because the hole is + // SI-7899 inferring by-name types is unsound. The correct behaviour is conditional because the hole is // exploited in Scalaz (Free.scala), as seen in: run/t7899-regression. def dropByNameIfStrict(tp: Type): Type = if (settings.inferByName) tp else dropByName(tp) def targsStrict = if (targs eq null) null else targs mapConserve dropByNameIfStrict diff --git a/src/compiler/scala/tools/nsc/util/DocStrings.scala b/src/compiler/scala/tools/nsc/util/DocStrings.scala index 352816803f..4ff7067a21 100755 --- a/src/compiler/scala/tools/nsc/util/DocStrings.scala +++ b/src/compiler/scala/tools/nsc/util/DocStrings.scala @@ -184,7 +184,7 @@ object DocStrings { extractSectionTag(str, section) -> section } - /** Extract the section tag, treating the section tag as an indentifier */ + /** Extract the section tag, treating the section tag as an identifier */ def extractSectionTag(str: String, section: (Int, Int)): String = str.substring(section._1, skipTag(str, section._1)) diff --git a/src/library/scala/collection/generic/Sorted.scala b/src/library/scala/collection/generic/Sorted.scala index a0b0e1318b..b2e63daaba 100644 --- a/src/library/scala/collection/generic/Sorted.scala +++ b/src/library/scala/collection/generic/Sorted.scala @@ -36,7 +36,7 @@ trait Sorted[K, +This <: Sorted[K, This]] { /** Creates a ranged projection of this collection. Any mutations in the * ranged projection will update this collection and vice versa. * - * Note: keys are not garuanteed to be consistent between this collection + * Note: keys are not guaranteed to be consistent between this collection * and the projection. This is the case for buffers where indexing is * relative to the projection. * diff --git a/src/reflect/scala/reflect/api/FlagSets.scala b/src/reflect/scala/reflect/api/FlagSets.scala index bcad84a3f0..d3294dad9b 100644 --- a/src/reflect/scala/reflect/api/FlagSets.scala +++ b/src/reflect/scala/reflect/api/FlagSets.scala @@ -48,7 +48,7 @@ import scala.language.implicitConversions * ''Of Note:'' This part of the Reflection API is being considered as a candidate for redesign. It is * quite possible that in future releases of the reflection API, flag sets could be replaced with something else. * - * For more details about `FlagSet`s and other aspects of Scala reflection, see the + * For more details about `FlagSet`s and other aspects of Scala reflection, see the * [[http://docs.scala-lang.org/overviews/reflection/overview.html Reflection Guide]] * * @group ReflectionAPI diff --git a/src/reflect/scala/reflect/api/Printers.scala b/src/reflect/scala/reflect/api/Printers.scala index 01b9759c70..c0abc5120c 100644 --- a/src/reflect/scala/reflect/api/Printers.scala +++ b/src/reflect/scala/reflect/api/Printers.scala @@ -130,7 +130,7 @@ import java.io.{ PrintWriter, StringWriter } * TermName("y")#2541#GET)) * }}} * - * For more details about `Printer`s and other aspects of Scala reflection, see the + * For more details about `Printer`s and other aspects of Scala reflection, see the * [[http://docs.scala-lang.org/overviews/reflection/overview.html Reflection Guide]] * * @group ReflectionAPI diff --git a/src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala b/src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala index e622e78d57..35858cdc78 100644 --- a/src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala +++ b/src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala @@ -13,7 +13,7 @@ trait StripMarginInterpolator { * The margin of each line is defined by whitespace leading up to a '|' character. * This margin is stripped '''before''' the arguments are interpolated into to string. * - * String escape sequences are '''not''' processed; this interpolater is designed to + * String escape sequences are '''not''' processed; this interpolator is designed to * be used with triple quoted Strings. * * {{{ diff --git a/test/files/jvm/javaReflection/Test.scala b/test/files/jvm/javaReflection/Test.scala index ae5a36eeb2..199399fec8 100644 --- a/test/files/jvm/javaReflection/Test.scala +++ b/test/files/jvm/javaReflection/Test.scala @@ -31,7 +31,7 @@ getSimpleName / getCanonicalName / isAnonymousClass / isLocalClass / isSynthetic These should be avoided, they yield unexpected results: - isAnonymousClass is always false. Scala-defined classes are never anonymous for Java - reflection. Java reflection insepects the class name to decide whether a class is + reflection. Java reflection inspects the class name to decide whether a class is anonymous, based on the name spec referenced above. Also, the implementation of "isAnonymousClass" calls "getSimpleName", which may throw. diff --git a/test/files/jvm/protectedacc.scala b/test/files/jvm/protectedacc.scala index 89e70b90d8..43d218fa89 100644 --- a/test/files/jvm/protectedacc.scala +++ b/test/files/jvm/protectedacc.scala @@ -74,7 +74,7 @@ package p { package b { import a._; - /** Test interraction with Scala inherited methods and currying. */ + /** Test interaction with Scala inherited methods and currying. */ class B extends A { class C { def m = { diff --git a/test/files/neg/t8431.scala b/test/files/neg/t8431.scala index 032a1f394d..bc45bb62ae 100644 --- a/test/files/neg/t8431.scala +++ b/test/files/neg/t8431.scala @@ -48,7 +48,7 @@ class TestExplicit { {val c1 = convert2(s); c1.combined} } -// These ones work before and after; infering G=Null doesn't need to contribute an undetermined type param. +// These ones work before and after; inferring G=Null doesn't need to contribute an undetermined type param. class Test3 { import C.{cbf, convert1, convert2} val s: Invariant[Null] = ??? diff --git a/test/files/pos/t8947/Macro_1.scala b/test/files/pos/t8947/Macro_1.scala index 4a5de3decb..ace389f339 100644 --- a/test/files/pos/t8947/Macro_1.scala +++ b/test/files/pos/t8947/Macro_1.scala @@ -35,7 +35,7 @@ object X { // symtab.EmptyTree.setAttachments(symtab.NoPosition) // } // - // To make this visible to the macro implementaiton, it will need to be compiled in an earlier stage, + // To make this visible to the macro implementation, it will need to be compiled in an earlier stage, // e.g a separate SBT sub-project. } diff --git a/test/files/run/blame_eye_triple_eee-double.check b/test/files/run/blame_eye_triple_eee-double.check index 5e46d91a8f..53eac99ecd 100644 --- a/test/files/run/blame_eye_triple_eee-double.check +++ b/test/files/run/blame_eye_triple_eee-double.check @@ -6,4 +6,4 @@ if (x != x) is good if (NaN != x) is good x matching was good NaN matching was good -loop with NaN was goood +loop with NaN was good diff --git a/test/files/run/blame_eye_triple_eee-double.scala b/test/files/run/blame_eye_triple_eee-double.scala index 1640aead40..4dcbfe7a7a 100644 --- a/test/files/run/blame_eye_triple_eee-double.scala +++ b/test/files/run/blame_eye_triple_eee-double.scala @@ -56,6 +56,6 @@ object Test extends App { else z = NaN i += 1 } - if (z.isNaN && i == 10) println("loop with NaN was goood") + if (z.isNaN && i == 10) println("loop with NaN was good") else println("loop with NaN was broken") } diff --git a/test/files/run/blame_eye_triple_eee-float.check b/test/files/run/blame_eye_triple_eee-float.check index 5e46d91a8f..53eac99ecd 100644 --- a/test/files/run/blame_eye_triple_eee-float.check +++ b/test/files/run/blame_eye_triple_eee-float.check @@ -6,4 +6,4 @@ if (x != x) is good if (NaN != x) is good x matching was good NaN matching was good -loop with NaN was goood +loop with NaN was good diff --git a/test/files/run/blame_eye_triple_eee-float.scala b/test/files/run/blame_eye_triple_eee-float.scala index 4deb9f3d60..bcc6b195d5 100644 --- a/test/files/run/blame_eye_triple_eee-float.scala +++ b/test/files/run/blame_eye_triple_eee-float.scala @@ -56,6 +56,6 @@ object Test extends App { else z = NaN i += 1 } - if (z.isNaN && i == 10) println("loop with NaN was goood") + if (z.isNaN && i == 10) println("loop with NaN was good") else println("loop with NaN was broken") } diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala index c364425ec9..7fb4a04546 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -239,7 +239,7 @@ object Test extends App { // result type of default getters: parameter type, except if this one mentions any type // parameter, in which case the result type is inferred. examples: - // result type of default getter is "String => String". if it were infered, the compiler + // result type of default getter is "String => String". if it were inferred, the compiler // would put "Nothing => Nothing", which is useless def transform(s: String, f: String => String = identity _) = f(s) println(transform("my text")) diff --git a/test/files/run/t0631.scala b/test/files/run/t0631.scala index c401ed31cb..8d672574ec 100644 --- a/test/files/run/t0631.scala +++ b/test/files/run/t0631.scala @@ -11,6 +11,6 @@ object Test extends App { case class Bar(x: Foo) val b = new Bar(new Foo) - // this should not call Foo.equals, but simply compare object identiy of b + // this should not call Foo.equals, but simply compare object identity of b println(b == b) } diff --git a/test/files/run/t2526.scala b/test/files/run/t2526.scala index 53f3059135..9f3c48ec61 100644 --- a/test/files/run/t2526.scala +++ b/test/files/run/t2526.scala @@ -38,7 +38,7 @@ object Test { /* * Checks foreach of `actual` goes over all the elements in `expected` - * We duplicate the method above because there is no common inteface between Traversable and + * We duplicate the method above because there is no common interface between Traversable and * Iterator and we want to avoid converting between collections to ensure that we test what * we mean to test. */ diff --git a/test/files/run/t7817-tree-gen.scala b/test/files/run/t7817-tree-gen.scala index a8317fda6e..094c0d6289 100644 --- a/test/files/run/t7817-tree-gen.scala +++ b/test/files/run/t7817-tree-gen.scala @@ -1,6 +1,6 @@ import scala.tools.partest._ -// Testing that `mkAttributedRef` doesn't incude the package object test.`package`, +// Testing that `mkAttributedRef` doesn't include the package object test.`package`, // under joint and separate compilation. package testSep { class C { object O } } diff --git a/test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala b/test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala index a3b6137f68..40fb42d63c 100644 --- a/test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala +++ b/test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala @@ -68,7 +68,7 @@ object RuntimeErrorProps extends QuasiquoteProperties("errors") { q"for(..$enums) 0" } - property("for inlalid enum") = testFails { + property("for invalid enum") = testFails { val enums = q"foo" :: Nil q"for(..$enums) 0" } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala index b8c5f85c49..0309bb97cc 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala @@ -503,7 +503,7 @@ class InlinerTest extends ClearAfterClass { |class C extends T """.stripMargin val List(c, t, tClass) = compile(code) - // the static implementaiton method is inlined into the mixin, so there's no invocation in the mixin + // the static implementation method is inlined into the mixin, so there's no invocation in the mixin assertNoInvoke(getSingleMethod(c, "f")) } 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 1ce1b88ff2..5ef2458c0a 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala @@ -56,7 +56,7 @@ class MethodLevelOpts extends ClearAfterClass { } @Test - def inlineReturnInCachtNotTry(): Unit = { + def inlineReturnInCatchNotTry(): Unit = { val code = "def f: Int = return { try 1 catch { case _: Throwable => 2 } }" // cannot inline the IRETURN into the try block (because RETURN may throw IllegalMonitorState) val m = singleMethod(methodOptCompiler)(code) -- cgit v1.2.3