Skip to content

Commit d5fc464

Browse files
ice-phoenixbelyaev-mikhail
authored andcommitted
Minor fixes for the context receiver overload resolution draft
1 parent fd71154 commit d5fc464

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/md/kotlin.core/overload-resolution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Implicit receivers are available in a syntactic scope according to the following
2525
- In a [classifier declaration][Classifier declaration] scope (including object and companion object declarations), the declared object is available as implicit `this`;
2626
- In a [classifier declaration][Classifier declaration] scope (including object and companion object declarations), the static callables of the declared object are available on a phantom static implicit `this`;
2727
- If a function or a property is an extension, `this` parameter of the extension is also available inside the extension declaration;
28-
- If a function or a property is [contextual][Contextual function declarations], its context receiver parameters are available inside the declaration as implicit receivers;
28+
- If a function or a property is [contextual][Contextual function declaration], its context receiver parameters are available inside the declaration as implicit receivers;
2929
- If a lambda expression has an extension function type, `this` argument of the lambda expression is also available inside the lambda expression declaration.
3030

3131
> Important: a phantom static implicit `this` is a special receiver, which is included in the receiver chain for the purposes of handling static functions from [enum classes][Enum class declaration].
@@ -148,7 +148,7 @@ An *extension callable* is one of the following:
148148
149149
A *local callable* is any callable which is declared in a [statement scope][Scopes and identifiers].
150150
151-
### Contextual callables
151+
#### Contextual callables
152152
153153
A _contextual callable_ is any callable with one or more context receiver parameters.
154154
@@ -467,7 +467,7 @@ For every two distinct members of the candidate set $F_1$ and $F_2$, the followi
467467
> Note: this constraint system checks whether $F_1$ can forward itself to $F_2$.
468468
469469
> Note: it may seem strange to process built-in integer types in a way different from other types, but it is needed for cases when the call argument is an integer literal with an [integer literal type][Integer literal types].
470-
> The $\Widen$ operator ensures the desired priority between overloads with integer type arguments.
470+
> The $\Widen$ operator ensures the [desired priority][Integer type widening] between overloads with integer type arguments.
471471
472472
If the resulting constraint system is sound, it means that $F_1$ is equally or more applicable than $F_2$ as an overload candidate (aka applicability criteria).
473473
The check is then repeated with $F_1$ and $F_2$ swapped.

0 commit comments

Comments
 (0)