Skip to content

Commit 099fe59

Browse files
authored
Describe subtyping rules for shared descriptor types (#34)
1 parent db7b2d3 commit 099fe59

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

proposals/custom-descriptors/Overview.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ However, the following new subtyping rules are introduced:
145145
- A declared supertype of a type without a `describes` clause must also
146146
not have a `describes` clause.
147147

148+
- With shared-everything-threads,
149+
a shared described type must have a shared descriptor type and vice versa,
150+
and an unshared described type must have an unshared descriptor type and vice versa.
151+
> Note: this could be relaxed to allow unshared described types to have shared descriptor types
152+
> (but not vice versa) if there is demand for this in the future.
153+
148154
The first two rules,
149155
governing types with or without `descriptor` clauses,
150156
are necessary to ensure the soundness of the `ref.get_desc` instruction described below.

0 commit comments

Comments
 (0)