Skip to content
github-actions[bot] edited this page Jun 5, 2026 · 1 revision

emit-in-loop - An emit statement (>>) inside a loop body has no effect

Non-compliant Code Example

_method a.b
  _local loop_val <<
    _for element _over collection.fast_elements()
    _loop
      >> element
    _endloop
  show(loop_val)  # loop_val is always _unset, emits have no effect.
_endmethod

Compliant Code Example

_method a.b
  _local loop_val <<
    _for element _over collection.fast_elements()
    _loop
      _leave _with element
    _endloop
  show(loop_val)  # loop_val has a value from the first iteration of the loop.
_endmethod

Note

This page is generated. Any changes made to this page through the wiki will be lost in the future.

Clone this wiki locally