Skip to content

Commit

Permalink
Merge pull request scala#4596 from janekdb/2.11.x-typos-p-r
Browse files Browse the repository at this point in the history
Fix 27 typos (p-r)
  • Loading branch information
SethTisue committed Jul 1, 2015
2 parents 495fdb8 + 3fc4dd8 commit 4fe9fdc
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/scala/tools/nsc/typechecker/Namers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/manual/scala/tools/docutil/ManMaker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion src/reflect/scala/reflect/api/Internals.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/reflect/scala/reflect/internal/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/reflect/scala/reflect/runtime/SymbolTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/scaladoc/scala/tools/nsc/doc/model/Entity.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/disabled/pos/spec-List.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/files/jvm/innerClassEnclMethodJavaReflection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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) = {
Expand Down
2 changes: 1 addition & 1 deletion test/files/neg/t8675b.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions test/files/pos/t8111.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)()
Expand Down
2 changes: 1 addition & 1 deletion test/files/run/t1987b/cce_test.scala
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion test/files/run/t8893b.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion test/files/scalacheck/quasiquotes/ErrorProps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"_"
Expand Down

0 comments on commit 4fe9fdc

Please sign in to comment.