Skip to content

Commit 248009c

Browse files
authored
Merge pull request #8380 from robstoll/patch-35
doc(creator apply): typos
2 parents f8e65de + 91bdeef commit 248009c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/reference/other-new-features/creator-applications.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ class StringBuilder(s: String) {
1313
StringBuilder("abc") // same as new StringBuilder("abc")
1414
StringBuilder() // same as new StringBuilder()
1515
```
16-
Creator applications generalize a functionality provided so far only for case classes, but the mechanism how this is achieved is different. Instead generating an apply method, the compiler adds a new possible interpretation to a function call `f(args)`. The previous rules are:
16+
Creator applications generalize a functionality provided so far only for case classes, but the mechanism how this is achieved is different. Instead of generating an apply method, the compiler adds a new possible interpretation to a function call `f(args)`. The previous rules are:
1717

1818
Given a function call `f(args)`,
1919

2020
- if `f` is a method applicable to `args`, typecheck `f(args)` unchanged,
2121
- otherwise, if `f` has an `apply` method applicable to `args` as a member, continue with `f.apply(args)`,
22-
- otherwise, if `f` is of the form `p.m` and there is an implicit conversion `c` applicable to `p` so that `c(p).m` is applicable to `args`, continue with `c(p).m(args)`
22+
- otherwise, if `f` is of the form `p.m` and there is an implicit conversion `c` applicable to `p` so that `c(p).m` is applicable to `args`, continue with `c(p).m(args)`
2323

2424
There's now a fourth rule following these rules:
2525

@@ -40,4 +40,4 @@ caused numerous problems, including
4040

4141
- overloading ambiguities
4242
- overriding errors
43-
- shadowing of user-defined `apply` methods by more specific auto-generated ones.
43+
- shadowing of user-defined `apply` methods by more specific auto-generated ones.

0 commit comments

Comments
 (0)