Skip to content

Commit 549dc88

Browse files
committed
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.
1 parent d9f623d commit 549dc88

File tree

140 files changed

+233
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+233
-233
lines changed

spec/04-basic-declarations-and-definitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ For every parameter $p_{i,j}$ with a default argument a method named
631631
expression. Here, $n$ denotes the parameter's position in the method
632632
declaration. These methods are parametrized by the type parameter clause
633633
`[$\mathit{tps}\,$]` and all value parameter clauses
634-
`($\mathit{ps}_1$)$\ldots$($\mathit{ps}_{i-1}$)` preceeding $p_{i,j}$.
634+
`($\mathit{ps}_1$)$\ldots$($\mathit{ps}_{i-1}$)` preceding $p_{i,j}$.
635635
The `$f\$$default$\$$n` methods are inaccessible for
636636
user programs.
637637

spec/05-classes-and-objects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ consists of the following steps.
128128
occurrence in the linearization.
129129
- Finally the statement sequence $\mathit{stats}\,$ is evaluated.
130130

131-
###### Delayed Initializaton
131+
###### Delayed Initialization
132132
The initialization code of an object or class (but not a trait) that follows
133133
the superclass
134134
constructor invocation and the mixin-evaluation of the template's base

spec/06-expressions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ followed by operators starting with ``|`', etc.
666666

667667
There's one exception to this rule, which concerns
668668
[_assignment operators_](#assignment-operators).
669-
The precedence of an assigment operator is the same as the one
669+
The precedence of an assignment operator is the same as the one
670670
of simple assignment `(=)`. That is, it is lower than the
671671
precedence of any other operator.
672672

@@ -1761,7 +1761,7 @@ trait Dynamic {
17611761
```
17621762

17631763
Assume a selection of the form $e.x$ where the type of $e$ conforms to `scala.Dynamic`.
1764-
Further assuming the selection is not followed by any function arguments, such an expression can be rewitten under the conditions given [here](#implicit-conversions) to:
1764+
Further assuming the selection is not followed by any function arguments, such an expression can be rewritten under the conditions given [here](#implicit-conversions) to:
17651765

17661766
```scala
17671767
$e$.applyDynamic("$x$")

spec/08-pattern-matching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ case class If[T](c: Term[Boolean],
609609

610610
There are terms to represent numeric literals, incrementation, a zero
611611
test, and a conditional. Every term carries as a type parameter the
612-
type of the expression it representes (either `Int` or `Boolean`).
612+
type of the expression it represents (either `Int` or `Boolean`).
613613

614614
A type-safe evaluator for such terms can be written as follows.
615615

spec/09-top-level-definitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ The `main` method of a program can be directly defined in the
159159
object, or it can be inherited. The scala library defines a special class
160160
`scala.App` whose body acts as a `main` method.
161161
An objects $m$ inheriting from this class is thus a program,
162-
which executes the initializaton code of the object $m$.
162+
which executes the initialization code of the object $m$.
163163

164164
###### Example
165165
The following example will create a hello world program by defining

src/actors/scala/actors/Actor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ object Actor extends Combinators {
205205
* Actions in `f` have to contain the rest of the computation of `self`,
206206
* as this method will never return.
207207
*
208-
* A common method of continuting the computation is to send a message
208+
* A common method of continuing the computation is to send a message
209209
* to another actor:
210210
* {{{
211211
* react {

src/actors/scala/actors/LinkedQueue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* and takes when the queue is not empty.
2323
* Normally a put and a take can proceed simultaneously.
2424
* (Although it does not allow multiple concurrent puts or takes.)
25-
* This class tends to perform more efficently than
25+
* This class tends to perform more efficiently than
2626
* other Channel implementations in producer/consumer
2727
* applications.
2828
* <p>[<a href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html"> Introduction to this package. </a>]

src/actors/scala/actors/remote/Proxy.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private[remote] class Proxy(node: Node, name: Symbol, @transient var kernel: Net
8484
}
8585

8686
// Proxy is private[remote], but these classes are public and use it in a public
87-
// method signature. That makes the only method they have non-overriddable.
87+
// method signature. That makes the only method they have non-overridable.
8888
// So I made them final, which seems appropriate anyway.
8989

9090
final class LinkToFun extends Function2[AbstractActor, Proxy, Unit] with Serializable {

src/actors/scala/actors/threadpool/AbstractCollection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Written by Dawid Kurzyniec, based on public domain code written by Doug Lea
3-
* and publictly available documentation, and released to the public domain, as
3+
* and publicly available documentation, and released to the public domain, as
44
* explained at http://creativecommons.org/licenses/publicdomain
55
*/
66

src/actors/scala/actors/threadpool/ExecutorCompletionService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public ExecutorCompletionService(Executor executor) {
135135
* @param completionQueue the queue to use as the completion queue
136136
* normally one dedicated for use by this service. This queue is
137137
* treated as unbounded -- failed attempted <tt>Queue.add</tt>
138-
* operations for completed taskes cause them not to be
138+
* operations for completed tasks cause them not to be
139139
* retrievable.
140140
* @throws NullPointerException if executor or completionQueue are <tt>null</tt>
141141
*/

src/actors/scala/actors/threadpool/locks/ReentrantReadWriteLock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
*
2121
* <p>The order of entry
2222
* to the read and write lock is unspecified, subject to reentrancy
23-
* constraints. A nonfair lock that is continously contended may
23+
* constraints. A nonfair lock that is continuously contended may
2424
* indefinitely postpone one or more reader or writer threads, but
2525
* will normally have higher throughput than a fair lock.
2626
* <p>
2727
*
2828
* DEPARTURE FROM java.util.concurrent: this implementation impose
29-
* a writer-preferrence and thus its acquisition order may be different
29+
* a writer-preference and thus its acquisition order may be different
3030
* than in java.util.concurrent.
3131
*
3232
* <li><b>Reentrancy</b>

src/asm/scala/tools/asm/Label.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ void visitSubroutine(final Label JSR, final long id, final int nbSubroutines) {
545545
}
546546

547547
// ------------------------------------------------------------------------
548-
// Overriden Object methods
548+
// Overridden Object methods
549549
// ------------------------------------------------------------------------
550550

551551
/**

src/asm/scala/tools/asm/tree/analysis/Analyzer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ private void findSubroutine(int insn, final Subroutine sub,
375375
* instruction of the method. The size of the returned array is
376376
* equal to the number of instructions (and labels) of the method. A
377377
* given frame is <tt>null</tt> if the corresponding instruction
378-
* cannot be reached, or if an error occured during the analysis of
378+
* cannot be reached, or if an error occurred during the analysis of
379379
* the method.
380380
*/
381381
public Frame<V>[] getFrames() {
@@ -435,7 +435,7 @@ protected Frame<V> newFrame(final Frame<? extends V> src) {
435435

436436
/**
437437
* Creates a control flow graph edge. The default implementation of this
438-
* method does nothing. It can be overriden in order to construct the
438+
* method does nothing. It can be overridden in order to construct the
439439
* control flow graph of a method (this method is called by the
440440
* {@link #analyze analyze} method during its visit of the method's code).
441441
*

src/asm/scala/tools/asm/tree/analysis/Interpreter.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected Interpreter(final int api) {
8282
* the bytecode instruction to be interpreted.
8383
* @return the result of the interpretation of the given instruction.
8484
* @throws AnalyzerException
85-
* if an error occured during the interpretation.
85+
* if an error occurred during the interpretation.
8686
*/
8787
public abstract V newOperation(AbstractInsnNode insn)
8888
throws AnalyzerException;
@@ -101,7 +101,7 @@ public abstract V newOperation(AbstractInsnNode insn)
101101
* @return the result of the interpretation of the given instruction. The
102102
* returned value must be <tt>equal</tt> to the given value.
103103
* @throws AnalyzerException
104-
* if an error occured during the interpretation.
104+
* if an error occurred during the interpretation.
105105
*/
106106
public abstract V copyOperation(AbstractInsnNode insn, V value)
107107
throws AnalyzerException;
@@ -122,7 +122,7 @@ public abstract V copyOperation(AbstractInsnNode insn, V value)
122122
* the argument of the instruction to be interpreted.
123123
* @return the result of the interpretation of the given instruction.
124124
* @throws AnalyzerException
125-
* if an error occured during the interpretation.
125+
* if an error occurred during the interpretation.
126126
*/
127127
public abstract V unaryOperation(AbstractInsnNode insn, V value)
128128
throws AnalyzerException;
@@ -146,7 +146,7 @@ public abstract V unaryOperation(AbstractInsnNode insn, V value)
146146
* the second argument of the instruction to be interpreted.
147147
* @return the result of the interpretation of the given instruction.
148148
* @throws AnalyzerException
149-
* if an error occured during the interpretation.
149+
* if an error occurred during the interpretation.
150150
*/
151151
public abstract V binaryOperation(AbstractInsnNode insn, V value1, V value2)
152152
throws AnalyzerException;
@@ -167,7 +167,7 @@ public abstract V binaryOperation(AbstractInsnNode insn, V value1, V value2)
167167
* the third argument of the instruction to be interpreted.
168168
* @return the result of the interpretation of the given instruction.
169169
* @throws AnalyzerException
170-
* if an error occured during the interpretation.
170+
* if an error occurred during the interpretation.
171171
*/
172172
public abstract V ternaryOperation(AbstractInsnNode insn, V value1,
173173
V value2, V value3) throws AnalyzerException;
@@ -185,7 +185,7 @@ public abstract V ternaryOperation(AbstractInsnNode insn, V value1,
185185
* the arguments of the instruction to be interpreted.
186186
* @return the result of the interpretation of the given instruction.
187187
* @throws AnalyzerException
188-
* if an error occured during the interpretation.
188+
* if an error occurred during the interpretation.
189189
*/
190190
public abstract V naryOperation(AbstractInsnNode insn,
191191
List<? extends V> values) throws AnalyzerException;
@@ -203,7 +203,7 @@ public abstract V naryOperation(AbstractInsnNode insn,
203203
* @param expected
204204
* the expected return type of the analyzed method.
205205
* @throws AnalyzerException
206-
* if an error occured during the interpretation.
206+
* if an error occurred during the interpretation.
207207
*/
208208
public abstract void returnOperation(AbstractInsnNode insn, V value,
209209
V expected) throws AnalyzerException;

src/asm/scala/tools/asm/util/Printer.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public abstract Printer visitClassAnnotation(final String desc,
181181
*/
182182
public Printer visitClassTypeAnnotation(final int typeRef,
183183
final TypePath typePath, final String desc, final boolean visible) {
184-
throw new RuntimeException("Must be overriden");
184+
throw new RuntimeException("Must be overridden");
185185
}
186186

187187
/**
@@ -264,7 +264,7 @@ public abstract Printer visitFieldAnnotation(final String desc,
264264
*/
265265
public Printer visitFieldTypeAnnotation(final int typeRef,
266266
final TypePath typePath, final String desc, final boolean visible) {
267-
throw new RuntimeException("Must be overriden");
267+
throw new RuntimeException("Must be overridden");
268268
}
269269

270270
/**
@@ -287,7 +287,7 @@ public Printer visitFieldTypeAnnotation(final int typeRef,
287287
* {@link scala.tools.asm.MethodVisitor#visitParameter(String, int)}.
288288
*/
289289
public void visitParameter(String name, int access) {
290-
throw new RuntimeException("Must be overriden");
290+
throw new RuntimeException("Must be overridden");
291291
}
292292

293293
/**
@@ -309,7 +309,7 @@ public abstract Printer visitMethodAnnotation(final String desc,
309309
*/
310310
public Printer visitMethodTypeAnnotation(final int typeRef,
311311
final TypePath typePath, final String desc, final boolean visible) {
312-
throw new RuntimeException("Must be overriden");
312+
throw new RuntimeException("Must be overridden");
313313
}
314314

315315
/**
@@ -380,7 +380,7 @@ public void visitMethodInsn(final int opcode, final String owner,
380380
visitMethodInsn(opcode, owner, name, desc, itf);
381381
return;
382382
}
383-
throw new RuntimeException("Must be overriden");
383+
throw new RuntimeException("Must be overridden");
384384
}
385385

386386
/**
@@ -397,7 +397,7 @@ public void visitMethodInsn(final int opcode, final String owner,
397397
visitMethodInsn(opcode, owner, name, desc);
398398
return;
399399
}
400-
throw new RuntimeException("Must be overriden");
400+
throw new RuntimeException("Must be overridden");
401401
}
402402

403403
/**
@@ -457,7 +457,7 @@ public abstract void visitMultiANewArrayInsn(final String desc,
457457
*/
458458
public Printer visitInsnAnnotation(final int typeRef,
459459
final TypePath typePath, final String desc, final boolean visible) {
460-
throw new RuntimeException("Must be overriden");
460+
throw new RuntimeException("Must be overridden");
461461
}
462462

463463
/**
@@ -473,7 +473,7 @@ public abstract void visitTryCatchBlock(final Label start, final Label end,
473473
*/
474474
public Printer visitTryCatchAnnotation(final int typeRef,
475475
final TypePath typePath, final String desc, final boolean visible) {
476-
throw new RuntimeException("Must be overriden");
476+
throw new RuntimeException("Must be overridden");
477477
}
478478

479479
/**
@@ -491,7 +491,7 @@ public abstract void visitLocalVariable(final String name,
491491
public Printer visitLocalVariableAnnotation(final int typeRef,
492492
final TypePath typePath, final Label[] start, final Label[] end,
493493
final int[] index, final String desc, final boolean visible) {
494-
throw new RuntimeException("Must be overriden");
494+
throw new RuntimeException("Must be overridden");
495495
}
496496

497497
/**

src/compiler/scala/tools/ant/Scalac.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
479479

480480
/** Tests if a file exists and prints a warning in case it doesn't. Always
481481
* returns the file, even if it doesn't exist.
482-
* @param file A file to test for existance.
482+
* @param file A file to test for existence.
483483
* @return The same file. */
484484
protected def existing(file: File): File = {
485485
if (!file.exists)

src/compiler/scala/tools/nsc/Global.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
234234

235235
/** Called by ScalaDocAnalyzer when a doc comment has been parsed. */
236236
def signalParsedDocComment(comment: String, pos: Position) = {
237-
// TODO: this is all very borken (only works for scaladoc comments, not regular ones)
237+
// TODO: this is all very broken (only works for scaladoc comments, not regular ones)
238238
// --> add hooks to parser and refactor Interactive global to handle comments directly
239239
// in any case don't use reporter for parser hooks
240240
reporter.comment(pos, comment)
@@ -1461,7 +1461,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
14611461
}
14621462

14631463

1464-
/** Caching member symbols that are def-s in Defintions because they might change from Run to Run. */
1464+
/** Caching member symbols that are def-s in Definitions because they might change from Run to Run. */
14651465
val runDefinitions: definitions.RunDefinitions = new definitions.RunDefinitions
14661466

14671467
/** Compile list of source files,

src/compiler/scala/tools/nsc/PhaseAssembly.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ trait PhaseAssembly {
1818

1919
/**
2020
* Aux datastructure for solving the constraint system
21-
* The depency graph container with helper methods for node and edge creation
21+
* The dependency graph container with helper methods for node and edge creation
2222
*/
2323
private class DependencyGraph {
2424

src/compiler/scala/tools/nsc/backend/icode/GenICode.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ abstract class GenICode extends SubComponent {
10771077
()
10781078
case (_, UNIT) =>
10791079
ctx.bb.emit(DROP(from), pos)
1080-
// otherwise we'd better be doing a primtive -> primitive coercion or there's a problem
1080+
// otherwise we'd better be doing a primitive -> primitive coercion or there's a problem
10811081
case _ if !from.isRefOrArrayType && !to.isRefOrArrayType =>
10821082
coerce(from, to)
10831083
case _ =>

src/compiler/scala/tools/nsc/backend/icode/Primitives.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ trait Primitives { self: ICodes =>
6060

6161
// type : (buf,el) => buf
6262
// range: lf,rg <- { BOOL, Ix, Ux, Rx, REF, STR }
63-
// jvm : It should call the appropiate 'append' method on StringBuffer
63+
// jvm : It should call the appropriate 'append' method on StringBuffer
6464
case class StringConcat(el: TypeKind) extends Primitive
6565

6666
/** Signals the beginning of a series of concatenations.

src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,13 @@ abstract class TypeFlowAnalysis {
332332
`remainingCALLs` also caches info about the typestack just before the callsite, so as to spare computing them again at inlining time.
333333
334334
Besides caching, a further optimization involves skipping those basic blocks whose in-flow and out-flow isn't needed anyway (as explained next).
335-
A basic block lacking a callsite in `remainingCALLs`, when visisted by the standard algorithm, won't cause any inlining.
335+
A basic block lacking a callsite in `remainingCALLs`, when visited by the standard algorithm, won't cause any inlining.
336336
But as we know from the way type-flows are computed, computing the in- and out-flow for a basic block relies in general on those of other basic blocks.
337337
In detail, we want to focus on that sub-graph of the CFG such that control flow may reach a remaining candidate callsite.
338338
Those basic blocks not in that subgraph can be skipped altogether. That's why:
339339
- `forwardAnalysis()` in `MTFAGrowable` now checks for inclusion of a basic block in `relevantBBs`
340340
- same check is performed before adding a block to the worklist, and as part of choosing successors.
341-
The bookkeeping supporting on-the-fly pruning of irrelevant blocks requires overridding most methods of the dataflow-analysis.
341+
The bookkeeping supporting on-the-fly pruning of irrelevant blocks requires overriding most methods of the dataflow-analysis.
342342
343343
The rest of the story takes place in Inliner, which does not visit all of the method's basic blocks but only on those represented in `remainingCALLs`.
344344

src/compiler/scala/tools/nsc/backend/jvm/BCodeSyncAndTry.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ abstract class BCodeSyncAndTry extends BCodeBodyBuilder {
284284
* ------
285285
*/
286286

287-
// a note on terminology: this is not "postHandlers", despite appearences.
287+
// a note on terminology: this is not "postHandlers", despite appearances.
288288
// "postHandlers" as in the source-code view. And from that perspective, both (3.A) and (3.B) are invisible implementation artifacts.
289289
if (hasFinally) {
290290
nopIfNeeded(startTryBody)

0 commit comments

Comments
 (0)