Don't omit the controlling typevar for instructions without results.
The controlling type variable passed to the format constructor in the
InstBuilder trait is not just used to generate the result values. In an
EncCursor, it is also used to encode the instruction, so VOID doesn't
work.
@@ -572,7 +572,7 @@ def gen_inst_builder(inst, fmt):
if inst.is_polymorphic and not inst.use_typevar_operand:
# This was an explicit method argument.
args.append(inst.ctrl_typevar.name)
- elif len(inst.value_results) == 0 or not inst.is_polymorphic:
+ elif not inst.is_polymorphic:
# No controlling type variable needed.
args.append('types::VOID')
else:
