Bug
The pipe operator does not correctly desugar when the RHS is a module-qualified call. The LHS value is not injected as the first argument.
Reproducer:
import util;
private fn f(@Int -> @Int)
requires(true) ensures(true) effects(pure)
{ @Int.0 |> util::inc() }
Given util exports fn inc(@Int -> @Int), this should desugar to util::inc(@Int.0) but instead produces:
error: Function 'inc' expects 1 argument(s), got 0. (E201)
Non-module-qualified pipes work correctly:
private fn f(@Int -> @Int)
requires(true) ensures(true) effects(pure)
{ @Int.0 |> inc() }
Root cause
The pipe desugaring (likely in transform.py) handles FnCall nodes but not ModuleCall nodes, so the LHS argument is not inserted for module-qualified calls.
Impact
Low — workaround is to use direct call syntax util::inc(@Int.0) instead of pipe. Discovered during PR #325 (test coverage improvements).
Bug
The pipe operator does not correctly desugar when the RHS is a module-qualified call. The LHS value is not injected as the first argument.
Reproducer:
Given
utilexportsfn inc(@Int -> @Int), this should desugar toutil::inc(@Int.0)but instead produces:Non-module-qualified pipes work correctly:
Root cause
The pipe desugaring (likely in
transform.py) handlesFnCallnodes but notModuleCallnodes, so the LHS argument is not inserted for module-qualified calls.Impact
Low — workaround is to use direct call syntax
util::inc(@Int.0)instead of pipe. Discovered during PR #325 (test coverage improvements).