Skip to content

Commit 0f494ea

Browse files
Merge pull request #3667 from k0ala/doc-ref-other-typos
Fix typos in documentation: reference > other new features
2 parents 5502d5c + debcb80 commit 0f494ea

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

docs/docs/reference/inline.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ we'd get
6969

7070
instead. This behavior is designed so that calling an inline method is
7171
semantically the same as calling a normal method: By-value arguments
72-
are evaluated before the call wherea by-name arguments are evaluated
72+
are evaluated before the call whereas by-name arguments are evaluated
7373
each time they are referenced. As a consequence, it is often
74-
preferrable to make arguments of inline methods by-name in order to
74+
preferable to make arguments of inline methods by-name in order to
7575
avoid unnecessary evaluations.
7676

7777
Inline methods can be recursive. For instance, when called with a constant
@@ -114,8 +114,8 @@ overhead:
114114
Existing Scala defines a `@inline` annotation which is used as a hint
115115
for the backend to inline. For most purposes, this annotation is
116116
superseded by the `inline` modifier. The modifier is more powerful
117-
than the annotation: Expansion is guarenteed instead of best effort,
118-
it happens in the fronend instead of in the backend, and it also applies
117+
than the annotation: Expansion is guaranteed instead of best effort,
118+
it happens in the frontend instead of in the backend, and it also applies
119119
to method arguments and recursive methods.
120120

121121
Since `inline` is now a keyword, it would be a syntax error to write

docs/docs/reference/multiversal-equality.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ would not typecheck if an implicit was declared like this for type `T`
3131
This definition effectively says that value of type `T` can (only) be
3232
compared with `==` or `!=` to other values of type `T`. The definition
3333
is used only for type checking; it has no significance for runtime
34-
behavior, since `==` always maps to `equals` and `!=` alwatys maps to
34+
behavior, since `==` always maps to `equals` and `!=` always maps to
3535
the negation of `equals`. The right hand side of the definition is a value
3636
that has any `Eq` instance as its type. Here is the definition of class
3737
`Eq` and its companion object:
@@ -63,7 +63,7 @@ other numbers, sequences only comparable to other
6363
sequences and sets only comparable to other sets.
6464

6565
There's also a "fallback" instance named `eqAny` that allows comparisons
66-
over all types that do not themeselves have an `Eq` instance. `eqAny` is
66+
over all types that do not themselves have an `Eq` instance. `eqAny` is
6767
defined as follows:
6868

6969
def eqAny[L, R]: Eq[L, R] = Eq
@@ -102,8 +102,7 @@ The precise rules for equality checking are as follows.
102102

103103
Here _lifting_ a type `S` means replacing all references to abstract types
104104
in covariant positions of `S` by their upper bound, and to replacing
105-
all refinement types in in covariant positions of `S` by their parent.
106-
The purpose if lifte
105+
all refinement types in covariant positions of `S` by their parent.
107106

108107
More on multiversal equality is found in a [blog post](http://www.scala-lang.org/blog/2016/05/06/multiversal-equality.html)
109108
and a [Github issue](https://github.com/lampepfl/dotty/issues/1247).

docs/docs/reference/named-typeargs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: doc-page
33
title: "Named Type Arguments"
44
---
55

6-
Type arguments of methods can now be named as well as by position. Example:
6+
Type arguments of methods can now be named, as well as by position. Example:
77

88

99
def construct[Elem, Coll[_]](xs: Elem*): Coll[Elem] = ???
@@ -20,6 +20,6 @@ The main benefit of named type arguments is that they allow some
2020
arguments to be omitted. Indeed, if type arguments are named, some
2121
arguments may be left out. An example is the definition of `xs3`
2222
above. A missing type argument is inferred as usual by local type
23-
inference. The same is not true for positional arguments, which have
24-
to be given always for all type parameters.
23+
inference. The same is not true for positional arguments, which must always
24+
be provided for all type parameters.
2525

docs/docs/reference/trait-parameters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ambiguities. For instance, you might try to extend `Greeting` twice,
2222
with different parameters.
2323

2424
```scala
25-
/*!*/ class D extends C with Greeting("Bill") // error: parameters passed twice
25+
/*!*/ class D extends C with Greeting("Bill") // error: parameter passed twice
2626
```
2727

2828
Should this print "Bob" or "Bill"? In fact this program is illegal,
@@ -57,4 +57,4 @@ class E extends Greeting("Bob") with FormalGreeting
5757

5858
### Reference
5959

60-
For more info, see [Scala SIP 25](http://docs.scala-lang.org/sips/pending/trait-parameters.html).
60+
For more info, see [Scala SIP 25](http://docs.scala-lang.org/sips/pending/trait-parameters.html).

0 commit comments

Comments
 (0)