Skip to content

Commit 79171ce

Browse files
committed
Merge pull request scala#4705 from mpociecha/fix-typos3
Fix typos in spec, docs and comments
2 parents f8a6d21 + 4b63953 commit 79171ce

40 files changed

+52
-52
lines changed

docs/TODO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
The process is about the same for symbols in PolyTypes. The main
5555
difference is that type parameters may be referenced and thus we
56-
need something like De Bruijn indicies to represent these
56+
need something like De Bruijn indices to represent these
5757
references.
5858

5959

spec/01-lexical-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ multiLineChars ::= {[‘"’] [‘"’] charNoDoubleQuote} {‘"’}
443443
444444
A multi-line string literal is a sequence of characters enclosed in
445445
triple quotes `""" ... """`. The sequence of characters is
446-
arbitrary, except that it may contain three or more consuctive quote characters
446+
arbitrary, except that it may contain three or more consecutive quote characters
447447
only at the very end. Characters
448448
must not necessarily be printable; newlines or other
449449
control characters are also permitted. Unicode escapes work as everywhere else, but none

spec/06-expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1736,7 +1736,7 @@ so `scala.Any` is the type inferred for `a`.
17361736
_Eta-expansion_ converts an expression of method type to an
17371737
equivalent expression of function type. It proceeds in two steps.
17381738

1739-
First, one identifes the maximal sub-expressions of $e$; let's
1739+
First, one identifies the maximal sub-expressions of $e$; let's
17401740
say these are $e_1 , \ldots , e_m$. For each of these, one creates a
17411741
fresh name $x_i$. Let $e'$ be the expression resulting from
17421742
replacing every maximal subexpression $e_i$ in $e$ by the

spec/07-implicits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ The _parts_ of a type $T$ are:
8484
- if $T$ is an abstract type, the parts of its upper bound;
8585
- if $T$ denotes an implicit conversion to a type with a method with argument types $T_1 , \ldots , T_n$ and result type $U$,
8686
the union of the parts of $T_1 , \ldots , T_n$ and $U$;
87-
- the parts of quantified (existential or univeral) and annotated types are defined as the parts of the underlying types (e.g., the parts of `T forSome { ... }` are the parts of `T`);
87+
- the parts of quantified (existential or universal) and annotated types are defined as the parts of the underlying types (e.g., the parts of `T forSome { ... }` are the parts of `T`);
8888
- in all other cases, just $T$ itself.
8989

9090
Note that packages are internally represented as classes with companion modules to hold the package members.

spec/12-the-scala-standard-library.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Any numeric value type $T$ supports the following methods.
171171
evaluated by converting the receiver and its argument to their
172172
operation type and performing the given arithmetic operation of that
173173
type.
174-
* Parameterless arithmethic methods identity (`+`) and negation
174+
* Parameterless arithmetic methods identity (`+`) and negation
175175
(`-`), with result type $T$. The first of these returns the
176176
receiver unchanged, whereas the second returns its negation.
177177
* Conversion methods `toByte`, `toShort`, `toChar`,
@@ -194,7 +194,7 @@ Integer numeric value types support in addition the following operations:
194194
operation of that type.
195195

196196
* A parameterless bit-negation method (`~`). Its result type is
197-
the reciver type $T$ or `Int`, whichever is larger.
197+
the receiver type $T$ or `Int`, whichever is larger.
198198
The operation is evaluated by converting the receiver to the result
199199
type and negating every bit in its value.
200200
* Bit-shift methods left-shift (`<<`), arithmetic right-shift
@@ -745,7 +745,7 @@ object Predef {
745745
def readf2(format: String) = Console.readf2(format)
746746
def readf3(format: String) = Console.readf3(format)
747747

748-
// Implict conversions ------------------------------------------------
748+
// Implicit conversions ------------------------------------------------
749749

750750
...
751751
}

spec/15-changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ formal parameter types. Added section on
3131
[numeric widening](06-expressions.html#numeric-widening) to support
3232
weak conformance.
3333

34-
Tightened rules to avoid accidential [overrides](05-classes-and-objects.html#overriding).
34+
Tightened rules to avoid accidental [overrides](05-classes-and-objects.html#overriding).
3535

3636
Removed class literals.
3737

@@ -53,7 +53,7 @@ has been brought in line with. From now on `+=`, has the same precedence as `=`.
5353

5454
#### Wildcards as function parameters
5555

56-
A formal parameter to an anonymous fucntion may now be a
56+
A formal parameter to an anonymous function may now be a
5757
[wildcard represented by an underscore](06-expressions.html#placeholder-syntax-for-anonymous-functions).
5858

5959
> _ => 7 // The function that ignores its argument

src/actors/scala/actors/Future.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ package scala.actors
1212
import scala.actors.scheduler.DaemonScheduler
1313
import scala.concurrent.SyncVar
1414

15-
/** A function of arity 0, returing a value of type `T` that,
15+
/** A function of arity 0, returning a value of type `T` that,
1616
* when applied, blocks the current actor (`Actor.self`)
1717
* until the future's value is available.
1818
*

src/compiler/scala/tools/nsc/ast/TreeGen.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ abstract class TreeGen extends scala.reflect.internal.TreeGen with TreeDSL {
261261
* Create a method based on a Function
262262
*
263263
* Used both to under `-Ydelambdafy:method` create a lifted function and
264-
* under `-Ydelamdafy:inline` to create the apply method on the anonymous
264+
* under `-Ydelambdafy:inline` to create the apply method on the anonymous
265265
* class.
266266
*
267267
* It creates a method definition with value params cloned from the

src/compiler/scala/tools/nsc/ast/parser/Parsers.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,11 +2031,11 @@ self =>
20312031
/** Drop `private` modifier when followed by a qualifier.
20322032
* Contract `abstract` and `override` to ABSOVERRIDE
20332033
*/
2034-
private def normalizeModifers(mods: Modifiers): Modifiers =
2034+
private def normalizeModifiers(mods: Modifiers): Modifiers =
20352035
if (mods.isPrivate && mods.hasAccessBoundary)
2036-
normalizeModifers(mods &~ Flags.PRIVATE)
2036+
normalizeModifiers(mods &~ Flags.PRIVATE)
20372037
else if (mods hasAllFlags (Flags.ABSTRACT | Flags.OVERRIDE))
2038-
normalizeModifers(mods &~ (Flags.ABSTRACT | Flags.OVERRIDE) | Flags.ABSOVERRIDE)
2038+
normalizeModifiers(mods &~ (Flags.ABSTRACT | Flags.OVERRIDE) | Flags.ABSOVERRIDE)
20392039
else
20402040
mods
20412041

@@ -2080,7 +2080,7 @@ self =>
20802080
* AccessModifier ::= (private | protected) [AccessQualifier]
20812081
* }}}
20822082
*/
2083-
def accessModifierOpt(): Modifiers = normalizeModifers {
2083+
def accessModifierOpt(): Modifiers = normalizeModifiers {
20842084
in.token match {
20852085
case m @ (PRIVATE | PROTECTED) => in.nextToken() ; accessQualifierOpt(Modifiers(flagTokens(m)))
20862086
case _ => NoMods
@@ -2094,7 +2094,7 @@ self =>
20942094
* | override
20952095
* }}}
20962096
*/
2097-
def modifiers(): Modifiers = normalizeModifers {
2097+
def modifiers(): Modifiers = normalizeModifiers {
20982098
def loop(mods: Modifiers): Modifiers = in.token match {
20992099
case PRIVATE | PROTECTED =>
21002100
loop(accessQualifierOpt(addMod(mods, flagTokens(in.token), tokenRange(in))))

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@ abstract class GenICode extends SubComponent {
20162016
*
20172017
* This could result in unreachable code which has to be cleaned up later, e.g. if the try and all the exception
20182018
* handlers always end in RETURN then there will be no "normal" flow out of the try/catch/finally.
2019-
* Later reachability analysis will remove unreacahble code.
2019+
* Later reachability analysis will remove unreachable code.
20202020
*/
20212021
def Try(body: Context => Context,
20222022
handlers: List[(Symbol, TypeKind, Context => Context)],
@@ -2060,7 +2060,7 @@ abstract class GenICode extends SubComponent {
20602060
if (settings.YdisableUnreachablePrevention || !outerCtx.bb.ignore) {
20612061
if (finalizer != EmptyTree) {
20622062
val exh = outerCtx.newExceptionHandler(NoSymbol, finalizer.pos) // finalizer covers exception handlers
2063-
this.addActiveHandler(exh) // .. and body aswell
2063+
this.addActiveHandler(exh) // .. and body as well
20642064
val exhStartCtx = finalizerCtx.enterExceptionHandler(exh)
20652065
exhStartCtx.bb killIf outerCtx.bb.ignore
20662066
val exception = exhStartCtx.makeLocal(finalizer.pos, ThrowableTpe, "exc")

0 commit comments

Comments
 (0)