Skip to content

CALL MICROFLOW: allow assigning return value to an existing variable (avoid CE0111) #622

@ako

Description

@ako

Problem

RETRIEVE implicitly declares its output variable, but CALL MICROFLOW assigning to an already-used name is rejected as a duplicate (CE0111). Writing $R = CALL MICROFLOW ... repeatedly forces unique names ($R1$R10) as a workaround.

Current behavior (partially addressed)

Detection shipped in v0.11.0: mxcli check --references flags reuse as CE0111 (mdl/executor/cmd_microflows_builder_validate.go:156,364-366; the output var is registered at :162). So the error is now surfaced before execution — but "reuse the existing variable on assignment" is still not implemented, so the unique-name workaround remains.

Request

Allow a CALL MICROFLOW return value to be assigned to an existing variable in scope (treat re-assignment as assignment, not re-declaration), matching how RETRIEVE behaves.

Touch points

  • mdl/executor/cmd_microflows_builder_validate.go:360-367 — distinguish "first assignment" (declare) from "re-assignment to existing var" (allowed) instead of always emitting CE0111.

Source: customer feedback batch (2026-06). Reporter: Miwa. Reporter severity: 4/5.
Filed after codebase investigation at 297e0b0a.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions