Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 5, 2026

Summary

  • Skip emitting Obj/EndObj wrapper for definitions that have no direct captures
  • Fixes case where A = (program (B)) with B = (expr) @x would lose B's captures

Why

When a definition only calls other definitions (no direct @name captures), wrapping it in Obj/EndObj would overwrite the called definition's result with an empty object. The called definition already handles its own scope.

Before: A's EndObj creates empty {}, losing B's {x: node}
After: A has no wrapper, B's result passes through correctly

@zharinov zharinov merged commit aaba3cf into master Jan 5, 2026
4 checks passed
@zharinov zharinov deleted the fix/skip-obj-for-passthrough-defs branch January 5, 2026 03:29
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