Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 4, 2026

Summary

  • Fixed Call instruction to search among siblings like inline patterns do
  • This preserves the "safe refactoring" promise: extracting a pattern to a named definition should not change matching behavior
  • Added skip_policy to checkpoints to support Call retry with sibling advancement

Problem

When using a named definition like (Num) inside a parent pattern, it should search among siblings the same way an inline pattern like (number) would:

Num = (number) @n
Q = (program (expression_statement (array (Num) @num)))

Previously this would fail to match the first number in [1, 2, 3].

Test

Added regression_call_searches_among_siblings test case.

@zharinov zharinov enabled auto-merge (squash) January 4, 2026 01:21
@zharinov zharinov merged commit a3b069e into master Jan 4, 2026
4 checks passed
@zharinov zharinov deleted the fix/call-sibling-search branch January 4, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants