Skip to content

Commit 185b6b2

Browse files
committed
Draft
1 parent 6eeb8fc commit 185b6b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

TSPL.docc/LanguageGuide/OpaqueTypes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ A boxed protocol type is also sometimes called an *existential type*,
498498
which comes from the phrase
499499
"there exists a type *T* such that *T* conforms to the protocol".
500500
To make a boxed protocol type,
501-
write `any` before the name of a protocol.
501+
write `any` before the name of a protocol (or protocol composition).
502502
Here's an example:
503503

504504
```swift
@@ -621,9 +621,9 @@ if let downcastTriangle = vertical.shapes[0] as? Triangle {
621621

622622
For more information, see <doc:TypeCasting#Downcasting>.
623623

624-
### Existential Of Composed Protocol Type
624+
### Existential Of Protocol Composition
625625

626-
An existential can also creating by writing `any` before a composed protocol type (see <doc:Protocols#Protocol-Composition>). This creates a box which holds a structure, class or enum that conforms to all the protocols listed.
626+
An existential can also creating by writing `any` before a protocol composition (see <doc:Protocols#Protocol-Composition>). This creates a box which holds a structure, class or enum that conforms to all the protocols listed.
627627

628628
```
629629
protocol Named {

0 commit comments

Comments
 (0)