Skip to content

Commit b25ca4d

Browse files
authored
Fix some typos
1 parent 4fd5990 commit b25ca4d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

proposals/0411-isolated-default-values.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The current actor isolation rules for default argument values do not admit data
4747

4848
I propose allowing default value expressions to have the same isolation as the enclosing function or the corresponding stored property. As usual, if the caller is not already in the isolation domain of the callee, then the call must be made asynchronously and must be explicitly marked with `await`. For isolated default values of stored properties, the implicit initialization only happens in the body of an `init` with the same isolation.
4949

50-
These rule makes the stored property example above invalid at the `nonisolated` initializer:
50+
These rules make the stored property example above invalid at the `nonisolated` initializer:
5151

5252
```swift
5353
@MainActor func requiresMainActor() -> Int { ... }
@@ -107,7 +107,7 @@ Evaluating a closure literal itself can happen in any isolation domain; the acto
107107

108108
The above `useDefaultClosure` function has a default argument value that is a closure literal. The closure body calls a `@MainActor`-isolated function synchronously, therefore the closure itself must be `@MainActor` isolated.
109109

110-
Note that the only way for a closure literal in a default argument to be isolated to an actor instance is for the isolation be written explicitly with an isolated parameter. The inference algorithm will never determine the isolation to be an actor instance based on the following two properties:
110+
Note that the only way for a closure literal in a default argument to be isolated to an actor instance is for the isolation to be written explicitly with an isolated parameter. The inference algorithm will never determine the isolation to be an actor instance based on the following two properties:
111111

112112
1. To be isolated to an actor instance, a closure must either have its own (explicit) isolated parameter or capture an isolated parameter from its enclosing context.
113113
2. Closure literals in default arguments cannot capture values.
@@ -145,7 +145,7 @@ In the above example, `useDefault` has default arguments that are isolated to `@
145145

146146
For a given call, argument evaluation happens in the following order:
147147

148-
1. Left-to-right evalution of explicit r-value arguments
148+
1. Left-to-right evaluation of explicit r-value arguments
149149
2. Left-to-right evaluation of default arguments and formal access arguments
150150

151151
For example:
@@ -173,7 +173,7 @@ explicitFormalVal
173173

174174
Unlike the explicit argument list, isolated default arguments must be evaluated in the isolation domain of the callee. As such, if any of the argument values require the isolation of the callee, argument evaluation happens in the following order:
175175

176-
1. Left-to-right evalution of explicit r-value arguments
176+
1. Left-to-right evaluation of explicit r-value arguments
177177
2. Left-to-right evaluation of formal access arguments
178178
3. Hop to the callee's isolation domain
179179
4. Left-to-right evaluation of default arguments
@@ -255,7 +255,7 @@ Note that this rule is not specific to default values, but it's necessary to spe
255255

256256
#### Default value isolation in synthesized initializers
257257

258-
For structs, default initializer expressions for stored properties are used as default argument values to the compiler-generated memberwise initializer. For structs and classes that have a compiler-generated no-parameter initializer, the default initializer expressions are also used in the syntheszied `init()` body.
258+
For structs, default initializer expressions for stored properties are used as default argument values to the compiler-generated memberwise initializer. For structs and classes that have a compiler-generated no-parameter initializer, the default initializer expressions are also used in the synthesized `init()` body.
259259

260260
If any of the type's stored properties with non-`Sendable` type are actor isolated, or if any of the isolated default initializer expressions are actor isolated, then the compiler-synthesized initializer(s) must also be actor isolated. For example:
261261

@@ -327,4 +327,4 @@ Thank you to Kavon Farvardin for implementing the default initializer expression
327327
* Changes from the first pitch
328328
* Require that isolated default arguments share the same isolation as their enclosing function or type.
329329
* Specify the semantic restrictions on initializing actor isolated properties from across isolation boundaries.
330-
* Enable using isolated default arguments from across isolation boundaries by changing the argument evaluation between formal access and default arguments.
330+
* Enable using isolated default arguments from across isolation boundaries by changing the argument evaluation between formal access and default arguments.

0 commit comments

Comments
 (0)