You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/md/kotlin.core/builtins.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -200,10 +200,10 @@ It is the type of the result of [string interpolation][String interpolation expr
200
200
publicoverridefinalfunhashCode(): Int
201
201
```
202
202
203
-
Thesemethods are defined to their default behaviour: only the same entry of an enumclassis equal to itself and no other object.
203
+
Thesemember functions are defined to their default behaviour: only the same entry of an enumclassis equal to itself and no other object.
204
204
Hash implementation is required to be consistent, but unspecified.
205
205
206
-
>Note: the presence of these finalmethods ensures the semantics of equality and comparison for the enumeration objects, as they cannot be overridden by the user.
206
+
>Note: the presence of these finalmember functions ensures the semantics of equality and comparison for the enumeration objects, as they cannot be overridden by the user.
Copy file name to clipboardExpand all lines: docs/src/md/kotlin.core/cdfa.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1354,9 +1354,9 @@ There are several kinds of effects:
1354
1354
**Calls-in-place** effect of function $F$ for a function-type parameter $P$ specifies that for every call of $F$ parameter $P$ will be also invoked as a function.
1355
1355
This effect may also have one of the three invocation types:
1356
1356
1357
-
-*At-least-once*, meaning that the $P$ will be invoked at least once;
1358
-
-*Exactly-once*, meaning that the $P$ will be invoked exactly once;
1359
-
-*At-most-once*, meaning that the $P$ will be invoked at most once.
1357
+
-*At-least-once*, meaning that $P$ will be invoked at least once;
1358
+
-*Exactly-once*, meaning that $P$ will be invoked exactly once;
1359
+
-*At-most-once*, meaning that $P$ will be invoked at most once.
1360
1360
1361
1361
These effects change the call graph that is produced for a function call of $F$ when supplied a lambda-expression parameter for $P$.
1362
1362
Without any effect, the graph looks like this:
@@ -1472,7 +1472,7 @@ If the corresponding parameter $P$ is introduced with *at-most-once* effect, thi
1472
1472
v
1473
1473
```
1474
1474
1475
-
This allows the control-flow information to be extracted from lambda expression according to the policy of their invocation.
1475
+
This allows the control-flow information to be extracted from lambda expression according to the policy of its invocation.
1476
1476
1477
1477
**Returns-implies-condition** effect of function $F$ for a boolean parameter $P$ specifies that if, when invoked normally, a call to $F$ returns, $P$ is assumed to be true.
Copy file name to clipboardExpand all lines: docs/src/md/kotlin.core/coroutines.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -223,7 +223,8 @@ When the cached `intercepted` continuation is no longer needed, it is released u
223
223
#### Coroutine intrinsics
224
224
225
225
Accessing the low-level continuations is performed using a limited number of built-in intrinsic functions, which form the complete coroutine API.
226
-
The rest of asynchronous programming support is provided as a Kotlin library.
226
+
The rest of asynchronous programming support is provided as a Kotlin library [`kotlinx.coroutines`](https://github.com/Kotlin/kotlinx.coroutines).
227
+
227
228
The complete built-in API for working with coroutines is shown below (all of these are declared in package `kotlin.coroutines.intrinsics` of the standard library).
Copy file name to clipboardExpand all lines: docs/src/md/kotlin.core/declarations.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -645,7 +645,7 @@ Annotation classes cannot be constructed directly unless passed as arguments to
645
645
#### Valueclassdeclaration
646
646
647
647
>Note:as of Kotlin1.5.0, user-defined value classes are an experimental feature.
648
-
>Thereis, however, a number of value classes inKotlin standard library
648
+
>Thereis, however, a number of value classes inKotlin standard library.
649
649
650
650
Aclassmay be declared a **value** class by using `inline` or `value` modifier in its declaration.
651
651
Value classes must adhere to the following limitations:
@@ -660,8 +660,7 @@ Value classes must adhere to the following limitations:
660
660
*They must not have any base classes besides `kotlin.Any`;
661
661
*No other properties of thisclassmay have backing fields.
662
662
663
-
>Note: `inline` modifier for value classes is supported as a legacy feature for compatibility with Kotlin1.4
664
-
> experimental inline classes and will be deprecated in the future
663
+
>Note: `inline` modifier for value classes is supported as a legacy feature for compatibility with Kotlin1.4 experimental inline classes and will be deprecated in the future.
665
664
666
665
Value classes implicitly override `equals` and `hashCode` member functions of `kotlin.Any` by delegating them to their only data property.
667
666
Unless `toString` is overriden by the value classdefinition, it is also implicitly overriden by delegating to the data property.
@@ -670,7 +669,7 @@ This also means that the property may be boxed back to the value class by using
670
669
671
670
Due to these restrictions, it is highly discouraged to use value classes with the [reference equality operators][Reference equality expressions].
672
671
673
-
>Note:in the future versions of Kotlin, value classes may be allowed to have more than one data property
672
+
>Note:in the future versions of Kotlin, value classes may be allowed to have more than one data property.
Copy file name to clipboardExpand all lines: docs/src/md/kotlin.core/statements.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,14 +67,14 @@ All of these operators are overloadable operator functions with the following ex
67
67
68
68
> Note: before Kotlin version 1.3, there were additional overloadable functions for `%` called `mod`/`modAssign`
69
69
70
-
After the expansion, the resulting [function call expression][Function calls and property access] or [simple assignment][Simple assignments] is processed according to their corresponding rules and overload resolution and type checking are performed.
70
+
After the expansion, the resulting [function call expression][Function calls and property access] or [simple assignment][Simple assignments] is processed according to their corresponding rules, and overload resolution and type checking are performed.
71
71
If both expansion variants result in correctly resolved and inferred code, this should be reported as an operator overloading ambiguity.
72
72
If only one of the expansion variants can be resolved correctly, this variant is picked as the correct one.
73
73
If neither of variants result in correct code, the operator calls must be reported as unresolved.
74
74
75
75
> Example: consider the following compound operator statement: `x[y] += z`.
76
76
> The corresponding expansion variants are `x.get(y).plusAssign(z)` and `x.set(x.get(y).plus(z))` according to expansion rules for corresponding operators.
77
-
> If, the call to `set` in the second variant results in resolution or inference error, the whole corresponding expansion is deemed unresolved and the first variant is picked if applicable.
77
+
> If, for example, the call to `set` in the second variant results in resolution or inference error, the whole corresponding expansion is deemed unresolved and the first variant is picked if applicable.
78
78
79
79
> Note: although for most real-world use cases operators `++` and `--` are similar to operator assignments, in Kotlin they are expressions and are described in the [corresponding section][Expressions-expressions] of this specification.
Copy file name to clipboardExpand all lines: docs/src/md/kotlin.core/type-inference.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -534,7 +534,7 @@ TODO(Lambda analysis order (and the order of overloading vs type inference in ge
534
534
535
535
### Bare type argument inference
536
536
537
-
Bare type argument inference is a special kind of type inference where, given a type $T$ and a constructor $TC$ the type arguments $A_0, A_1 \ldots A_N$ are inferred such that $TC[A_0, A_1 \ldots A_N] <:S$ where $T<:S$.
537
+
Bare type argument inference is a special kind of type inference where, given a type $T$ and a constructor $TC$, the type arguments $A_0, A_1 \ldots A_N$ are inferred such that $TC[A_0, A_1 \ldots A_N] <:S$ where $T<:S$.
538
538
Itis used together with *bare types* syntax sugar that can be employed in [type checking][Type-checking expressions] and [casting][Cast expressions] operators.
539
539
The process is performed as follows.
540
540
@@ -551,7 +551,7 @@ If $T$ is a nullable type $U?$, the steps given above are performed for its non-
551
551
552
552
## Builder-style type inference
553
553
554
-
Some functions or parameters of functions in the standard library are annotated with the special [`@BuilderInference`][Built-in annotations] annotation, making call to these functions eligible for the special kind of type inference: **builder-style type inference**.
554
+
Some functions or parameters of functions in the standard library are annotated with the special [`@BuilderInference`][Built-in annotations] annotation, making calls to these functions eligible for the special kind of type inference: **builder-style type inference**.
555
555
In order to allow builder-style inference for a function parameter, this parameter must hold the following properties:
0 commit comments