Problem
Several rename paths do not traverse match statements or their patterns.
rewrite_aliases_in_stmt has no Stmt::Match arm and falls through to an Unhandled statement type debug message.
rewrite_global_statements_only does not recurse into match case bodies.
- The module-variable transformers process match subjects, guards, and bodies but explicitly leave patterns unchanged.
Pattern expressions are runtime symbol references. For example, case status.READY: must be rewritten if status or the referenced symbol was renamed during inlining or conflict resolution.
Impact
A symbol collision can be resolved in definitions and ordinary expressions while leaving stale names in match value/class patterns or nested global declarations. The generated bundle can then raise NameError, match against the wrong object, or keep inconsistent global declarations.
Problem
Several rename paths do not traverse
matchstatements or their patterns.rewrite_aliases_in_stmthas noStmt::Matcharm and falls through to anUnhandled statement typedebug message.rewrite_global_statements_onlydoes not recurse into match case bodies.Pattern expressions are runtime symbol references. For example,
case status.READY:must be rewritten ifstatusor the referenced symbol was renamed during inlining or conflict resolution.Impact
A symbol collision can be resolved in definitions and ordinary expressions while leaving stale names in match value/class patterns or nested global declarations. The generated bundle can then raise
NameError, match against the wrong object, or keep inconsistent global declarations.