Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ make the same change here also.
> Grammar of a type inheritance clause:
>
> *type-inheritance-clause* → **`:`** *type-inheritance-list* \
> *type-inheritance-list* → *attributes*_?_ *type-identifier* | *attributes*_?_ *type-identifier* **`,`** *type-inheritance-list*
> *type-inheritance-list* → *attributes*_?_ **`~`**_?_ *type-identifier* | *attributes*_?_ *type-identifier* **`,`** *type-inheritance-list*

## Expressions

Expand Down
5 changes: 4 additions & 1 deletion TSPL.docc/ReferenceManual/Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,9 @@ Protocol types can inherit from any number of other protocols.
When a protocol type inherits from other protocols,
the set of requirements from those other protocols are aggregated together,
and any type that inherits from the current protocol must conform to all of those requirements.
Writing a tilde (`~`) in front of a protocol name in this list
suppresses an implicit conformance to that protocol,
as described in <doc:Protocols#Implicit-Conformance-to-a-Protocol>.

A type inheritance clause in an enumeration definition can be either a list of protocols,
or in the case of an enumeration that assigns raw values to its cases,
Expand All @@ -1347,7 +1350,7 @@ to specify the type of its raw values, see <doc:Enumerations#Raw-Values>.
> Grammar of a type inheritance clause:
>
> *type-inheritance-clause* → **`:`** *type-inheritance-list* \
> *type-inheritance-list* → *attributes*_?_ *type-identifier* | *attributes*_?_ *type-identifier* **`,`** *type-inheritance-list*
> *type-inheritance-list* → *attributes*_?_ **`~`**_?_ *type-identifier* | *attributes*_?_ *type-identifier* **`,`** *type-inheritance-list*

## Type Inference

Expand Down