From 91243694982f10d6061edac562b9af32b7bc9f4f Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Wed, 24 Jun 2015 21:32:07 -0700 Subject: SI-9206 Update REPL welcome message Everyone knows that a `help` command will result in `more information`. This commit moves the version string to the second line and adds some verve to the welcome. If anyone can't live without the old banner, they are now able to configure it explicitly, so there is still no blood on our hands. ``` $ scala Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40). Type in expressions to have them evaluated. Type :help for more information. scala> :quit $ skala Welcome to Scala! version 2.11.7-20150623-155244-eab44dd092 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40). Type in expressions for evaluation. Or try :help. scala> :quit ``` REPL tests now lop off the actual length of the welcome header; or, if necessary, remove the version number from a header embedded in output. --- test/files/jvm/interpreter.check | 2 -- test/files/jvm/throws-annot-from-java.check | 2 -- test/files/jvm/xml05.check | 2 -- 3 files changed, 6 deletions(-) (limited to 'test/files/jvm') diff --git a/test/files/jvm/interpreter.check b/test/files/jvm/interpreter.check index 9e875235c7..08372685d6 100644 --- a/test/files/jvm/interpreter.check +++ b/test/files/jvm/interpreter.check @@ -1,5 +1,3 @@ -Type in expressions to have them evaluated. -Type :help for more information. scala> // basics diff --git a/test/files/jvm/throws-annot-from-java.check b/test/files/jvm/throws-annot-from-java.check index c541b26fcc..ace264a4f5 100644 --- a/test/files/jvm/throws-annot-from-java.check +++ b/test/files/jvm/throws-annot-from-java.check @@ -1,5 +1,3 @@ -Type in expressions to have them evaluated. -Type :help for more information. scala> :power ** Power User mode enabled - BEEP WHIR GYVE ** diff --git a/test/files/jvm/xml05.check b/test/files/jvm/xml05.check index cad907525d..d456c5e1e4 100644 --- a/test/files/jvm/xml05.check +++ b/test/files/jvm/xml05.check @@ -1,5 +1,3 @@ -Type in expressions to have them evaluated. -Type :help for more information. scala> res0: scala.xml.Elem = -- cgit v1.2.3 From 3fc4dd8b9656cf7e2947a4b0be2b0aab7261bd22 Mon Sep 17 00:00:00 2001 From: Janek Bogucki Date: Tue, 30 Jun 2015 22:55:28 +0100 Subject: Fix 27 typos (p-r) --- src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala | 2 +- src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala | 2 +- src/compiler/scala/tools/nsc/typechecker/Namers.scala | 4 ++-- src/library/scala/collection/generic/MutableSortedSetFactory.scala | 2 +- src/manual/scala/tools/docutil/ManMaker.scala | 2 +- src/reflect/scala/reflect/api/Internals.scala | 2 +- src/reflect/scala/reflect/internal/Types.scala | 4 ++-- src/reflect/scala/reflect/runtime/SymbolTable.scala | 2 +- src/scaladoc/scala/tools/nsc/doc/base/MemberLookupBase.scala | 2 +- src/scaladoc/scala/tools/nsc/doc/base/comment/Comment.scala | 2 +- .../scala/tools/nsc/doc/html/page/diagram/DiagramStats.scala | 2 +- src/scaladoc/scala/tools/nsc/doc/model/Entity.scala | 2 +- src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala | 4 ++-- .../scala/tools/nsc/doc/model/ModelFactoryTypeSupport.scala | 2 +- test/disabled/pos/spec-List.scala | 2 +- test/files/jvm/innerClassEnclMethodJavaReflection.scala | 2 +- test/files/neg/t8675b.scala | 2 +- test/files/pos/t8111.scala | 6 +++--- test/files/run/t1987b/cce_test.scala | 2 +- test/files/run/t8893b.scala | 2 +- test/files/scalacheck/quasiquotes/ErrorProps.scala | 2 +- 21 files changed, 26 insertions(+), 26 deletions(-) (limited to 'test/files/jvm') diff --git a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala index 076f84ce7a..351a8e33d3 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala @@ -86,7 +86,7 @@ trait Opcodes { self: ICodes => * Each case subclass will represent a specific operation. */ abstract class Instruction extends Cloneable { - // Vlad: I used these for checking the quality of the implementation, and we should regularely run a build with them + // Vlad: I used these for checking the quality of the implementation, and we should regularly run a build with them // enabled. But for production these should definitely be disabled, unless we enjoy getting angry emails from Greg :) //if (!this.isInstanceOf[opcodes.LOAD_EXCEPTION]) // assert(consumed == consumedTypes.length) diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala b/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala index 5f8f0e167c..cf29c8090b 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala @@ -355,7 +355,7 @@ class BTypesFromSymbols[G <: Global](val global: G) extends BTypes { // See comment in BTypes, when is a class marked static in the InnerClass table. val isStaticNestedClass = isOriginallyStaticOwner(innerClassSym.originalOwner) - // After lambdalift (which is where we are), the rawowoner field contains the enclosing class. + // After lambdalift (which is where we are), the rawowner field contains the enclosing class. val enclosingClass = { // (1) Example java source: class C { static class D { } } // The Scala compiler creates a class and a module symbol for C. Because D is a static diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 77c49a862a..c1655467e9 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -204,7 +204,7 @@ trait Namers extends MethodSynthesis { } // FIXME - this logic needs to be thoroughly explained - // and justified. I know it's wrong with repect to package + // and justified. I know it's wrong with respect to package // objects, but I think it's also wrong in other ways. protected def conflict(newS: Symbol, oldS: Symbol) = ( ( !oldS.isSourceMethod @@ -1106,7 +1106,7 @@ trait Namers extends MethodSynthesis { * As a first side effect, this method assigns a MethodType constructed using this * return type to `meth`. This allows omitting the result type for recursive methods. * - * As another side effect, this method also assigns paramter types from the overridden + * As another side effect, this method also assigns parameter types from the overridden * method to parameters of `meth` that have missing types (the parser accepts missing * parameter types under -Yinfer-argument-types). */ diff --git a/src/library/scala/collection/generic/MutableSortedSetFactory.scala b/src/library/scala/collection/generic/MutableSortedSetFactory.scala index 0339a523e9..9bb12c2317 100644 --- a/src/library/scala/collection/generic/MutableSortedSetFactory.scala +++ b/src/library/scala/collection/generic/MutableSortedSetFactory.scala @@ -24,7 +24,7 @@ abstract class MutableSortedSetFactory[CC[A] <: mutable.SortedSet[A] with Sorted /** * mutable.SetBuilder uses '+' which is not a primitive for anything extending mutable.SetLike, - * this causes serious perfomances issues since each time 'elems = elems + x' + * this causes serious performance issues since each time 'elems = elems + x' * is evaluated elems is cloned (which is O(n)). * * Fortunately GrowingBuilder comes to rescue. diff --git a/src/manual/scala/tools/docutil/ManMaker.scala b/src/manual/scala/tools/docutil/ManMaker.scala index 47b861a80f..802b357f5f 100644 --- a/src/manual/scala/tools/docutil/ManMaker.scala +++ b/src/manual/scala/tools/docutil/ManMaker.scala @@ -18,7 +18,7 @@ class ManMaker extends Task { /** The directory to put html pages in */ private var htmlout: Option[File] = None - /** The directory to put man pags in */ + /** The directory to put man pages in */ private var manout: Option[File] = None diff --git a/src/reflect/scala/reflect/api/Internals.scala b/src/reflect/scala/reflect/api/Internals.scala index 577cd09295..1457fdc133 100644 --- a/src/reflect/scala/reflect/api/Internals.scala +++ b/src/reflect/scala/reflect/api/Internals.scala @@ -114,7 +114,7 @@ trait Internals { self: Universe => def substituteTypes(tree: Tree, from: List[Symbol], to: List[Type]): Tree /** Substitute given tree `to` for occurrences of nodes that represent - * `C.this`, where `C` referes to the given class `clazz`. + * `C.this`, where `C` refers to the given class `clazz`. */ def substituteThis(tree: Tree, clazz: Symbol, to: Tree): Tree diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index c760db3864..8c72405c8d 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/src/reflect/scala/reflect/internal/Types.scala @@ -2588,7 +2588,7 @@ trait Types * based on the bounds of the type parameters of the quantified type * In Scala syntax, given a java-defined class C[T <: String], the existential type C[_] * is improved to C[_ <: String] before skolemization, which captures (get it?) what Java does: - * enter the type paramers' bounds into the context when checking subtyping/type equality of existential types + * enter the type parameters' bounds into the context when checking subtyping/type equality of existential types * * Also tried doing this once during class file parsing or when creating the existential type, * but that causes cyclic errors because it happens too early. @@ -4263,7 +4263,7 @@ trait Types matchesType(res1, res2.substSym(tparams2, tparams1), alwaysMatchSimple) (tp1, tp2) match { case (MethodType(params1, res1), MethodType(params2, res2)) => - params1.length == params2.length && // useful pre-secreening optimization + params1.length == params2.length && // useful pre-screening optimization matchingParams(params1, params2, tp1.isInstanceOf[JavaMethodType], tp2.isInstanceOf[JavaMethodType]) && matchesType(res1, res2, alwaysMatchSimple) && tp1.isImplicit == tp2.isImplicit diff --git a/src/reflect/scala/reflect/runtime/SymbolTable.scala b/src/reflect/scala/reflect/runtime/SymbolTable.scala index 092bbd711f..eee2118898 100644 --- a/src/reflect/scala/reflect/runtime/SymbolTable.scala +++ b/src/reflect/scala/reflect/runtime/SymbolTable.scala @@ -3,7 +3,7 @@ package reflect package runtime /** - * This symbol table trait fills in the definitions so that class information is obtained by refection. + * This symbol table trait fills in the definitions so that class information is obtained by reflection. * It can be used either from a reflexive universe (class scala.reflect.runtime.JavaUniverse), or else from * a runtime compiler that uses reflection to get a class information (class scala.tools.reflect.ReflectGlobal) */ diff --git a/src/scaladoc/scala/tools/nsc/doc/base/MemberLookupBase.scala b/src/scaladoc/scala/tools/nsc/doc/base/MemberLookupBase.scala index cc217d2f80..839598a15f 100755 --- a/src/scaladoc/scala/tools/nsc/doc/base/MemberLookupBase.scala +++ b/src/scaladoc/scala/tools/nsc/doc/base/MemberLookupBase.scala @@ -114,7 +114,7 @@ trait MemberLookupBase { // Maintaining compatibility with previous links is a bit tricky here: // we have a preference for term names for all terms except for the last, where we prefer a class: // How to do this: - // - at each step we do a DFS search with the prefered strategy + // - at each step we do a DFS search with the preferred strategy // - if the search doesn't return any members, we backtrack on the last decision // * we look for terms with the last member's name // * we look for types with the same name, all the way up diff --git a/src/scaladoc/scala/tools/nsc/doc/base/comment/Comment.scala b/src/scaladoc/scala/tools/nsc/doc/base/comment/Comment.scala index a3d05ae50b..e5eb68d65a 100644 --- a/src/scaladoc/scala/tools/nsc/doc/base/comment/Comment.scala +++ b/src/scaladoc/scala/tools/nsc/doc/base/comment/Comment.scala @@ -93,7 +93,7 @@ abstract class Comment { def todo: List[Body] /** Whether the entity is deprecated. Using the `@deprecated` Scala attribute - * is prefereable to using this Scaladoc tag. */ + * is preferable to using this Scaladoc tag. */ def deprecated: Option[Body] /** An additional note concerning the contract of the entity. */ diff --git a/src/scaladoc/scala/tools/nsc/doc/html/page/diagram/DiagramStats.scala b/src/scaladoc/scala/tools/nsc/doc/html/page/diagram/DiagramStats.scala index ab8e9e2756..12c609af49 100644 --- a/src/scaladoc/scala/tools/nsc/doc/html/page/diagram/DiagramStats.scala +++ b/src/scaladoc/scala/tools/nsc/doc/html/page/diagram/DiagramStats.scala @@ -36,7 +36,7 @@ object DiagramStats { private[this] val filterTrack = new TimeTracker("diagrams model filtering") private[this] val modelTrack = new TimeTracker("diagrams model generation") private[this] val dotGenTrack = new TimeTracker("dot diagram generation") - private[this] val dotRunTrack = new TimeTracker("dot process runnning") + private[this] val dotRunTrack = new TimeTracker("dot process running") private[this] val svgTrack = new TimeTracker("svg processing") private[this] var brokenImages = 0 private[this] var fixedImages = 0 diff --git a/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala b/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala index 90de51d763..d55c51b19c 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala @@ -183,7 +183,7 @@ trait MemberEntity extends Entity { /** Indicates whether the member is inherited by implicit conversion */ def isImplicitlyInherited: Boolean - /** Indicates whether there is another member with the same name in the template that will take precendence */ + /** Indicates whether there is another member with the same name in the template that will take precedence */ def isShadowedImplicit: Boolean /** Indicates whether there are other implicitly inherited members that have similar signatures (and thus they all diff --git a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala index 3cbcbc433e..8ae31ce1c3 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala @@ -478,7 +478,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) { override lazy val comment = { def nonRootTemplate(sym: Symbol): Option[DocTemplateImpl] = if (sym eq RootPackage) None else findTemplateMaybe(sym) - /* Variable precendence order for implicitly added members: Take the variable definitions from ... + /* Variable precedence order for implicitly added members: Take the variable definitions from ... * 1. the target of the implicit conversion * 2. the definition template (owner) * 3. the current template @@ -994,7 +994,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) { // pruning modules that shouldn't be documented // Why Symbol.isInitialized? Well, because we need to avoid exploring all the space available to scaladoc // from the classpath -- scaladoc is a hog, it will explore everything starting from the root package unless we - // somehow prune the tree. And isInitialized is a good heuristic for prunning -- if the package was not explored + // somehow prune the tree. And isInitialized is a good heuristic for pruning -- if the package was not explored // during typer and refchecks, it's not necessary for the current application and there's no need to explore it. (!sym.isModule || sym.moduleClass.isInitialized) && // documenting only public and protected members diff --git a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryTypeSupport.scala b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryTypeSupport.scala index 2b7e2506d4..8834bc3efd 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryTypeSupport.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryTypeSupport.scala @@ -112,7 +112,7 @@ trait ModelFactoryTypeSupport { def needsPrefix: Boolean = { if ((owner != bSym.owner || preSym.isRefinementClass) && (normalizeTemplate(owner) != inTpl.sym)) return true - // don't get tricked into prefixng method type params and existentials: + // don't get tricked into prefixing method type params and existentials: // I tried several tricks BUT adding the method for which I'm creating the type => that simply won't scale, // as ValueParams are independent of their parent member, and I really don't want to add this information to // all terms, as we're already over the allowed memory footprint diff --git a/test/disabled/pos/spec-List.scala b/test/disabled/pos/spec-List.scala index b31e035c1b..6bed08ae8a 100644 --- a/test/disabled/pos/spec-List.scala +++ b/test/disabled/pos/spec-List.scala @@ -438,7 +438,7 @@ case object Nil extends List[Nothing] { throw new NoSuchElementException("head of empty list") override def tail: List[Nothing] = throw new NoSuchElementException("tail of empty list") - // Removal of equals method here might lead to an infinite recusion similar to IntMap.equals. + // Removal of equals method here might lead to an infinite recursion similar to IntMap.equals. override def equals(that: Any) = that match { case that1: Seq[_] => that1.isEmpty case _ => false diff --git a/test/files/jvm/innerClassEnclMethodJavaReflection.scala b/test/files/jvm/innerClassEnclMethodJavaReflection.scala index ee39cb43bf..a4d64d0b67 100644 --- a/test/files/jvm/innerClassEnclMethodJavaReflection.scala +++ b/test/files/jvm/innerClassEnclMethodJavaReflection.scala @@ -8,7 +8,7 @@ object Test extends App { // Some classes in scala-compiler.jar have references to jline / ant classes, which seem to be // not on the classpath. We just skip over those classes. // PENDING: for now we also allow missing $anonfun classes: the optimizer may eliminate some closures - // that are refferred to in EnclosingClass attributes. SI-9136 + // that are referred to in EnclosingClass attributes. SI-9136 val allowedMissingPackages = Set("jline", "org.apache.tools.ant", "$anonfun") def ok(t: Throwable) = { diff --git a/test/files/neg/t8675b.scala b/test/files/neg/t8675b.scala index 2c5015b1d0..bffed2141c 100644 --- a/test/files/neg/t8675b.scala +++ b/test/files/neg/t8675b.scala @@ -13,7 +13,7 @@ object Test { // in the backend. // // This error is itself a regression (or at least a change) in 2.11.0-M7, - // specifically in SI-7944. The type paramaters to the implicit view + // specifically in SI-7944. The type parameters to the implicit view // `EngineTools1` are undetermined, and are now treated as type variables // in the expected type of the closure argument to `withFilter`. for (path: List[Any] <- (null : Engine1).asRequirement.pathsIncludingSelf.toList) { diff --git a/test/files/pos/t8111.scala b/test/files/pos/t8111.scala index 0d63a16ba4..09463ce697 100644 --- a/test/files/pos/t8111.scala +++ b/test/files/pos/t8111.scala @@ -7,10 +7,10 @@ trait T { foo((u: Unit) => ma) foo(0, (u: Any) => ma) apply () - // crash due to side effects on the onwer of the symbol in the + // crash due to side effects on the owner of the symbol in the // qualifier or arguments of the application during an abandoned - // names/defaults transform. The code type checkes because of - // autp-tupling which promotes and empty parmater list to `(): Unit` + // names/defaults transform. The code type checks because of + // auto-tupling which promotes an empty parameter list to `(): Unit` foo((u: Any) => ma)() {{(u: Any) => ma}; this}.foo(0)() diff --git a/test/files/run/t1987b/cce_test.scala b/test/files/run/t1987b/cce_test.scala index 4f9acf0264..e131df7956 100644 --- a/test/files/run/t1987b/cce_test.scala +++ b/test/files/run/t1987b/cce_test.scala @@ -1,5 +1,5 @@ package scales.xml -//import scales.xml._ // using another pacakge and importing doesn't CCE +//import scales.xml._ // using another package and importing doesn't CCE object CCE_Test { def main(args: Array[String]): Unit = { diff --git a/test/files/run/t8893b.scala b/test/files/run/t8893b.scala index 19120871aa..066425aab6 100644 --- a/test/files/run/t8893b.scala +++ b/test/files/run/t8893b.scala @@ -5,7 +5,7 @@ object Test { def tick(i : Int): Unit = if (i == 0) () else if (i == 42) { - tick(0) /*not in tail posiiton*/ + tick(0) /*not in tail position*/ tick(i - 1) } else tick(i - 1) diff --git a/test/files/scalacheck/quasiquotes/ErrorProps.scala b/test/files/scalacheck/quasiquotes/ErrorProps.scala index 2cba07abf2..0c24149372 100644 --- a/test/files/scalacheck/quasiquotes/ErrorProps.scala +++ b/test/files/scalacheck/quasiquotes/ErrorProps.scala @@ -162,7 +162,7 @@ object ErrorProps extends QuasiquoteProperties("errors") { q"$n" """) - property("SI-8211: check unbound placeholder paremeters") = fails( + property("SI-8211: check unbound placeholder parameters") = fails( "unbound placeholder parameter", """ q"_" -- cgit v1.2.3