From 491f49e2c09c4d90ea8fa1ba806a8a19876e0454 Mon Sep 17 00:00:00 2001 From: Alex Martini Date: Fri, 12 Dec 2025 16:07:51 -0800 Subject: [PATCH 1/2] Add ~P syntax to grammar and an xref to the guide --- TSPL.docc/ReferenceManual/Types.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TSPL.docc/ReferenceManual/Types.md b/TSPL.docc/ReferenceManual/Types.md index 0da87b427..1e513b40c 100644 --- a/TSPL.docc/ReferenceManual/Types.md +++ b/TSPL.docc/ReferenceManual/Types.md @@ -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 . 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, @@ -1347,7 +1350,7 @@ to specify the type of its raw values, see . > 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 From ebafcf5996c0e50558d3f6a5c6f199cbd7ffd0d1 Mon Sep 17 00:00:00 2001 From: Alex Martini Date: Fri, 12 Dec 2025 16:11:33 -0800 Subject: [PATCH 2/2] Copy the change into the summary of the grammar --- TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md b/TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md index 11e9a2736..6c1c94e5e 100644 --- a/TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md +++ b/TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md @@ -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