Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit 305dd96

Browse files
committed
Merge pull request scala#4559 from janekdb/2.11.x-scaladoc-2
Fix some typos (a-c)
2 parents df73cb9 + 2dcc4c4 commit 305dd96

File tree

25 files changed

+33
-33
lines changed

25 files changed

+33
-33
lines changed

src/compiler/scala/tools/nsc/backend/opt/Inliners.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ abstract class Inliners extends SubComponent {
773773

774774
staleOut += block
775775

776-
tfa.remainingCALLs.remove(instr) // this bookkpeeping is done here and not in MTFAGrowable.reinit due to (1st) convenience and (2nd) necessity.
776+
tfa.remainingCALLs.remove(instr) // this bookkeeping is done here and not in MTFAGrowable.reinit due to (1st) convenience and (2nd) necessity.
777777
tfa.isOnWatchlist.remove(instr) // ditto
778778
tfa.warnIfInlineFails.remove(instr)
779779

src/compiler/scala/tools/nsc/classpath/ZipAndJarFileLookupFactory.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ object ZipAndJarFlatClassPathFactory extends ZipAndJarFileLookupFactory {
6161
}
6262

6363
/**
64-
* This type of classpath is closly related to the support for JSR-223.
64+
* This type of classpath is closely related to the support for JSR-223.
6565
* Its usage can be observed e.g. when running:
6666
* jrunscript -classpath scala-compiler.jar;scala-reflect.jar;scala-library.jar -l scala
6767
* with a particularly prepared scala-library.jar. It should have all classes listed in the manifest like e.g. this entry:

src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ abstract class SymbolLoaders {
373373
protected def doComplete(root: Symbol) { root.sourceModule.initialize }
374374
}
375375

376-
/** used from classfile parser to avoid cyclies */
376+
/** used from classfile parser to avoid cycles */
377377
var parentsLevel = 0
378378
var pendingLoadActions: List[() => Unit] = Nil
379379
}

src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ trait MatchTranslation {
248248
if (caseDefs forall treeInfo.isCatchCase) caseDefs
249249
else {
250250
val swatches = { // switch-catches
251-
// SI-7459 must duplicate here as we haven't commited to switch emission, and just figuring out
251+
// SI-7459 must duplicate here as we haven't committed to switch emission, and just figuring out
252252
// if we can ends up mutating `caseDefs` down in the use of `substituteSymbols` in
253253
// `TypedSubstitution#Substitution`. That is called indirectly by `emitTypeSwitch`.
254254
val bindersAndCases = caseDefs.map(_.duplicate) map { caseDef =>

src/compiler/scala/tools/nsc/typechecker/Typers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4443,7 +4443,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
44434443
def onError(typeErrors: Seq[AbsTypeError], warnings: Seq[(Position, String)]): Tree = {
44444444
if (Statistics.canEnable) Statistics.stopTimer(failedApplyNanos, start)
44454445

4446-
// If the problem is with raw types, copnvert to existentials and try again.
4446+
// If the problem is with raw types, convert to existentials and try again.
44474447
// See #4712 for a case where this situation arises,
44484448
if ((fun.symbol ne null) && fun.symbol.isJavaDefined) {
44494449
val newtpe = rawToExistential(fun.tpe)
@@ -4988,7 +4988,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
49884988
TypeTreeWithDeferredRefCheck(){ () =>
49894989
// wrap the tree and include the bounds check -- refchecks will perform this check (that the beta reduction was indeed allowed) and unwrap
49904990
// we can't simply use original in refchecks because it does not contains types
4991-
// (and the only typed trees we have have been mangled so they're not quite the original tree anymore)
4991+
// (and the only typed trees we have been mangled so they're not quite the original tree anymore)
49924992
checkBounds(result, tpt1.tpe.prefix, tpt1.symbol.owner, tpt1.symbol.typeParams, argtypes, "")
49934993
result // you only get to see the wrapped tree after running this check :-p
49944994
} setType (result.tpe) setPos(result.pos)

src/reflect/scala/reflect/internal/AnnotationCheckers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ trait AnnotationCheckers {
6060
* mode (see method adapt in trait Typers).
6161
*
6262
* An implementation cannot rely on canAdaptAnnotations being called before. If the implementing
63-
* class cannot do the adaptiong, it should return the tree unchanged.
63+
* class cannot do the adapting, it should return the tree unchanged.
6464
*/
6565
@deprecated("Create an AnalyzerPlugin and use adaptAnnotations", "2.10.1")
6666
def adaptAnnotations(tree: Tree, mode: Mode, pt: Type): Tree = tree

src/reflect/scala/reflect/internal/Symbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
987987
|| isLocalToBlock
988988
)
989989
)
990-
/** Is this symbol effectively final or a concrete term member of sealed class whose childred do not override it */
990+
/** Is this symbol effectively final or a concrete term member of sealed class whose children do not override it */
991991
final def isEffectivelyFinalOrNotOverridden: Boolean = isEffectivelyFinal || (isTerm && !isDeferred && isNotOverridden)
992992

993993
/** Is this symbol owned by a package? */

src/scaladoc/scala/tools/nsc/doc/Settings.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_))
143143
"dot" // by default, just pick up the system-wide dot
144144
)
145145

146-
/** The maxium nuber of normal classes to show in the diagram */
146+
/** The maximum number of normal classes to show in the diagram */
147147
val docDiagramsMaxNormalClasses = IntSetting(
148148
"-diagrams-max-classes",
149149
"The maximum number of superclasses or subclasses to show in a diagram",
@@ -152,7 +152,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_))
152152
_ => None
153153
)
154154

155-
/** The maxium nuber of implcit classes to show in the diagram */
155+
/** The maximum number of implicit classes to show in the diagram */
156156
val docDiagramsMaxImplicitClasses = IntSetting(
157157
"-diagrams-max-implicits",
158158
"The maximum number of implicitly converted classes to show in a diagram",

src/scaladoc/scala/tools/nsc/doc/model/Entity.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ trait DocTemplateEntity extends MemberTemplateEntity {
298298
/** The shadowing information for the implicitly added members */
299299
def implicitsShadowing: Map[MemberEntity, ImplicitMemberShadowing]
300300

301-
/** Classes that can be implcitly converted to this class */
301+
/** Classes that can be implicitly converted to this class */
302302
def incomingImplicitlyConvertedClasses: List[(DocTemplateEntity, ImplicitConversion)]
303303

304304
/** Classes to which this class can be implicitly converted to
@@ -484,10 +484,10 @@ trait ImplicitConversion {
484484
/** The entity for the method that performed the conversion, if it's documented (or just its name, otherwise) */
485485
def convertorMethod: Either[MemberEntity, String]
486486

487-
/** A short name of the convertion */
487+
/** A short name of the conversion */
488488
def conversionShortName: String
489489

490-
/** A qualified name uniquely identifying the convertion (currently: the conversion method's qualified name) */
490+
/** A qualified name uniquely identifying the conversion (currently: the conversion method's qualified name) */
491491
def conversionQualifiedName: String
492492

493493
/** The entity that performed the conversion */

src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ trait ModelFactoryImplicitSupport {
400400

401401
def isHiddenConversion = settings.hiddenImplicits(conversionQualifiedName)
402402

403-
override def toString = "Implcit conversion from " + sym.tpe + " to " + toType + " done by " + convSym
403+
override def toString = "Implicit conversion from " + sym.tpe + " to " + toType + " done by " + convSym
404404
}
405405

406406
/* ========================= HELPER METHODS ========================== */
@@ -479,7 +479,7 @@ trait ModelFactoryImplicitSupport {
479479
}
480480

481481
/**
482-
* Make implicits explicit - Not used curently
482+
* Make implicits explicit - Not used currently
483483
*/
484484
// object implicitToExplicit extends TypeMap {
485485
// def apply(tp: Type): Type = mapOver(tp) match {
@@ -561,7 +561,7 @@ trait ModelFactoryImplicitSupport {
561561
*
562562
* The trick here is that the resultType does not matter - the condition for removal it that paramss have the same
563563
* structure (A => B => C may not override (A, B) => C) and that all the types involved are
564-
* of the implcit conversion's member are subtypes of the parent members' parameters */
564+
* of the implicit conversion's member are subtypes of the parent members' parameters */
565565
def isDistinguishableFrom(t1: Type, t2: Type): Boolean = {
566566
// Vlad: I tried using matches but it's not exactly what we need:
567567
// (p: AnyRef)AnyRef matches ((t: String)AnyRef returns false -- but we want that to be true

src/scaladoc/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ trait DiagramFactory extends DiagramDirectiveParser {
5151
case p: (TemplateEntity, TypeEntity) if !classExcluded(p._1) => NormalNode(p._2, Some(p._1))()
5252
}.reverse
5353

54-
// incoming implcit conversions
54+
// incoming implicit conversions
5555
lazy val incomingImplicitNodes = tpl.incomingImplicitlyConvertedClasses.map {
5656
case (incomingTpl, conv) =>
5757
ImplicitNode(makeType(incomingTpl.sym.tpe, tpl), Some(incomingTpl))(implicitTooltip(from=incomingTpl, to=tpl, conv=conv))

test/files/jvm/bytecode-test-example/Test.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object Test extends BytecodeTest {
1717
def countNullChecks(insnList: InsnList): Int = {
1818
/** Is given instruction a null check?
1919
* NOTE
20-
* This will detect direct null compparsion as in
20+
* This will detect direct null comparison as in
2121
* if (x == null) ...
2222
* and not indirect as in
2323
* val foo = null

test/files/jvm/t7006/Foo_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ class Foo_1 {
55
} finally {
66
print("hello")
77
}
8-
while(true){} // ensure infinite loop doesn't break the algoirthm
8+
while(true){} // ensure infinite loop doesn't break the algorithm
99
}
1010
}

test/files/neg/names-defaults-neg.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ names-defaults-neg.scala:49: error: ambiguous reference to overloaded definition
6464
both method g in object t7 of type (a: B)String
6565
and method g in object t7 of type (a: C, b: Int*)String
6666
match argument types (C)
67-
t7.g(new C()) // ambigous reference
67+
t7.g(new C()) // ambiguous reference
6868
^
6969
names-defaults-neg.scala:53: error: parameter 'b' is already specified at parameter position 2
7070
test5(a = 1, b = "dkjl", b = "dkj")
@@ -79,7 +79,7 @@ names-defaults-neg.scala:61: error: ambiguous reference to overloaded definition
7979
both method f in object t8 of type (b: String, a: Int)String
8080
and method f in object t8 of type (a: Int, b: Object)String
8181
match argument types (a: Int,b: String) and expected result type Any
82-
println(t8.f(a = 0, b = "1")) // ambigous reference
82+
println(t8.f(a = 0, b = "1")) // ambiguous reference
8383
^
8484
names-defaults-neg.scala:69: error: wrong number of arguments for pattern A1(x: Int,y: String)
8585
A1() match { case A1(_) => () }

test/files/neg/names-defaults-neg.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ object Test extends App {
4646
def g(a: C, b: Int*) = "third"
4747
def g(a: B) = "fourth"
4848
}
49-
t7.g(new C()) // ambigous reference
49+
t7.g(new C()) // ambiguous reference
5050

5151
// vararg
5252
def test5(a: Int, b: String*) = a
@@ -58,7 +58,7 @@ object Test extends App {
5858
def f(a: Int, b: Object) = "first"
5959
def f(b: String, a: Int) = "second"
6060
}
61-
println(t8.f(a = 0, b = "1")) // ambigous reference
61+
println(t8.f(a = 0, b = "1")) // ambiguous reference
6262

6363

6464
// case class copy does not exist if there's a vararg

test/files/neg/t2866.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ t2866.scala:42: error: ambiguous implicit values:
55
both value two of type Int
66
and value one in object A of type => Int
77
match expected type Int
8-
assert(implicitly[Int] == 2) // !!! Not ambiguous in 2.8.0. Ambigous in 2.7.6
8+
assert(implicitly[Int] == 2) // !!! Not ambiguous in 2.8.0. Ambiguous in 2.7.6
99
^
1010
t2866.scala:50: error: ambiguous implicit values:
1111
both value two of type Int

test/files/neg/t2866.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ object Test {
3939
import A.one
4040
assert(implicitly[Int] == 1)
4141
implicit val two = 2
42-
assert(implicitly[Int] == 2) // !!! Not ambiguous in 2.8.0. Ambigous in 2.7.6
42+
assert(implicitly[Int] == 2) // !!! Not ambiguous in 2.8.0. Ambiguous in 2.7.6
4343
}
4444

4545
locally {

test/files/pos/t6575b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// inferred types were okay here as Function nodes aren't
2-
// translated into anoymous subclasses of AbstractFunctionN
2+
// translated into anonymous subclasses of AbstractFunctionN
33
// until after the typer.
44
//
55
// So this test is just confirmation.

test/files/pos/t6648.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Transformer {
1010
}
1111

1212
object transformer1 extends Transformer {
13-
// Adding explicit type arguments, or making the impilcit view
13+
// Adding explicit type arguments, or making the implicit view
1414
// seqToNodeSeq explicit avoids the crash
1515
NodeSeq.foo {
1616
// These both avoid the crash:

test/files/run/t6502.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ object Test extends StoreReporterDirectTest {
123123
}
124124

125125
def test6(): Unit = {
126-
// Avoid java.lang.NoClassDefFoundError triggered by the old appoach of using a Java
126+
// Avoid java.lang.NoClassDefFoundError triggered by the old approach of using a Java
127127
// classloader to parse .class files in order to read their names.
128128
val jar = "test6.jar"
129129
compileCode(app6, jar)

test/pending/pos/t1786.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** This a consequence of the current type checking algorithm, where bounds are checked only after variables are instantiated.
2-
* I believe this will change once we go to contraint-based type inference.
2+
* I believe this will change once we go to constraint-based type inference.
33
* Alternatively, we can pursue a more extensive fix to SI-6169
44
*
55
* The below code shows a compiler flaw in that the wildcard "_" as value for a bounded type parameter either

test/pending/run/idempotency-partial-functions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.tools.reflect.Eval
66
// Related to SI-6187
77
//
88
// Moved to pending as we are currently blocked by the inability
9-
// to reify the parent types of the anoymous function class,
9+
// to reify the parent types of the anonymous function class,
1010
// which are not part of the tree, but rather only part of the
1111
// ClassInfoType.
1212
object Test extends App {

test/scaladoc/resources/implicits-base-res.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object A {
5252
* def convToGtColonDoubleA(x: Double) // enrichA3: no constraints
5353
* def convToManifestA(x: Double) // enrichA7: no constraints
5454
* def convToMyNumericA(x: Double) // enrichA6: (if showAll is set) with a constraint that there is x: MyNumeric[Double] implicit in scope
55-
* def convToNumericA(x: Double) // enrichA1: no constraintsd
55+
* def convToNumericA(x: Double) // enrichA1: no constraints
5656
* def convToEnrichedA(x: Bar[Foo[Double]]) // enrichA5: no constraints, SHADOWED
5757
* def convToEnrichedA(x: Double) // enrichA0: no constraints, SHADOWED
5858
* def convToTraversableOps(x: Double) // enrichA7: no constraints

test/scaladoc/run/implicits-base.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ object Test extends ScaladocModelTest {
9494
assert(isShadowed(conv._member("convToEnrichedA")))
9595
assert(conv._member("convToEnrichedA").resultType.name == "Double")
9696

97-
// def convToNumericA: Double // enrichA1: no constraintsd
97+
// def convToNumericA: Double // enrichA1: no constraints
9898
conv = B._conversion(A.qualifiedName + ".enrichA1")
9999
assert(conv.members.length == 1)
100100
assert(conv.constraints.length == 0)

test/scaladoc/scalacheck/HtmlFactoryTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ object Test extends Properties("HtmlFactory") {
711711

712712
property("class") = files.get("com/example/p1/Clazz.html") match {
713713
case Some(node: scala.xml.Node) => {
714-
property("implicit convertion") =
714+
property("implicit conversion") =
715715
node.toString contains "<span class=\"modifier\">implicit </span>"
716716

717717
property("gt4s") =

0 commit comments

Comments
 (0)