From 2b594ce601a1bf0458b1a39efc6adf2a9ce6a29f Mon Sep 17 00:00:00 2001 From: Alessio Faieta <29785188+alessiofaieta@users.noreply.github.com> Date: Thu, 9 Apr 2026 17:21:17 +0200 Subject: [PATCH] [spec] Fix typo causing bad rendering of instruction in a note The instruction was rendered as `const i32 2` instead of `i32.const 2` because `instr` was missing. --- document/core/valid/instructions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index eef8989d19..581970dc16 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -1375,7 +1375,7 @@ $${rule: {Instrs_ok/sub Instrs_ok/frame}} To type this sequence, its subsequence ${instr*: (CONST I32 2) (BINOP I32 ADD)} needs to be valid with an intermediate type. But the direct type of ${instr: (CONST I32 2)} is ${instrtype: eps -> I32}, not matching the two inputs expected by ${instr: $($(BINOP I32 ADD))}. - The subsumption rule allows to weaken the type of ${:(CONST I32 2)} to the supertype ${instrtype: I32 -> I32 I32}, such that it can be composed with ${instr: $($(BINOP I32 ADD))} and yields the intermediate type ${instrtype: I32 -> I32 I32} for the subsequence. That can in turn be composed with the first constant. + The subsumption rule allows to weaken the type of ${instr: (CONST I32 2)} to the supertype ${instrtype: I32 -> I32 I32}, such that it can be composed with ${instr: $($(BINOP I32 ADD))} and yields the intermediate type ${instrtype: I32 -> I32 I32} for the subsequence. That can in turn be composed with the first constant. Furthermore, subsumption allows to drop init variables ${:x*} from the instruction type in a context where they are not needed, for example, at the end of the body of a :ref:`block `.