Skip to content

Capture context for partial function defaults in closures#2623

Merged
ChristianGruen merged 1 commit intoBaseXdb:mainfrom
GuntherRademacher:partial-fn-context-defaults
Mar 19, 2026
Merged

Capture context for partial function defaults in closures#2623
ChristianGruen merged 1 commit intoBaseXdb:mainfrom
GuntherRademacher:partial-fn-context-defaults

Conversation

@GuntherRademacher
Copy link
Member

The changes in this PR fix the handling of context-dependent default parameters in partial function applications. The added code ensures the context item is captured at function item creation time, by adding it as an extra closure binding. This prevents incorrect XPDY0002 errors that occurred in QT4 test cases FunctionCall-427 and FunctionCall-428.

@ChristianGruen ChristianGruen merged commit 9419d6e into BaseXdb:main Mar 19, 2026
1 check passed
@ChristianGruen ChristianGruen deleted the partial-fn-context-defaults branch March 19, 2026 09:20
@ChristianGruen
Copy link
Member

👍 Less code than I would have expected.

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