From 91bdeef43f2f090cdb72bf6d8d38829e22b028f8 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Wed, 26 Feb 2020 06:50:07 +0100 Subject: [PATCH] doc(creator apply): typos --- .../reference/other-new-features/creator-applications.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/reference/other-new-features/creator-applications.md b/docs/docs/reference/other-new-features/creator-applications.md index 6f2c5a830008..ce461927bc20 100644 --- a/docs/docs/reference/other-new-features/creator-applications.md +++ b/docs/docs/reference/other-new-features/creator-applications.md @@ -13,13 +13,13 @@ class StringBuilder(s: String) { StringBuilder("abc") // same as new StringBuilder("abc") StringBuilder() // same as new StringBuilder() ``` -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: +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: Given a function call `f(args)`, - if `f` is a method applicable to `args`, typecheck `f(args)` unchanged, - otherwise, if `f` has an `apply` method applicable to `args` as a member, continue with `f.apply(args)`, - - 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)` + - 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)` There's now a fourth rule following these rules: @@ -40,4 +40,4 @@ caused numerous problems, including - overloading ambiguities - overriding errors - - shadowing of user-defined `apply` methods by more specific auto-generated ones. \ No newline at end of file + - shadowing of user-defined `apply` methods by more specific auto-generated ones.