Skip to content

Commit df76f27

Browse files
committed
[spec] Fix missing limits subtyping rule
1 parent 4dfe036 commit df76f27

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

document/core/valid/matching.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Limits
167167

168168
$${rule-prose: Limits_sub}
169169

170-
$${rule: Limits_sub}
170+
$${rule: {Limits_sub/*}}
171171
172172

173173
.. index:: tag type

specification/wasm-3.0/2.2-validation.subtyping.spectec

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,15 @@ relation Tabletype_sub: context |- tabletype <: tabletype hint(name "S-table"
196196
relation Externtype_sub: context |- externtype <: externtype hint(name "S-extern") hint(macro "%externtypematch")
197197

198198

199-
rule Limits_sub:
200-
C |- `[n_1 .. m_1] <: `[n_2 .. m_2]
199+
rule Limits_sub/max:
200+
C |- `[n_1 .. m_1] <: `[n_2 .. m_2?]
201201
-- if n_1 >= n_2
202-
-- if m_1 <= m_2
202+
-- (if m_1 <= m_2)?
203+
204+
rule Limits_sub/eps:
205+
C |- `[n_1 .. eps] <: `[n_2 .. eps]
206+
-- if n_1 >= n_2
207+
203208

204209
rule Tagtype_sub:
205210
C |- deftype_1 <: deftype_2
63 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)