Skip to content

Support ValueGetter in nested maps - #1030

Open
draarivpatel-ui wants to merge 1 commit into
expr-lang:masterfrom
draarivpatel-ui:fix-valuegetter-nested-maps
Open

draarivpatel-ui wants to merge 1 commit into
expr-lang:masterfrom
draarivpatel-ui:fix-valuegetter-nested-maps

Conversation

@draarivpatel-ui

Copy link
Copy Markdown

Fixes #886

ValueGetter only patched member accesses when the compile-time type implemented one of the value interfaces. Values inside nested maps are typed as any, so params.ValueOne was left unwrapped and custom values could not be used in arithmetic expressions.

Member accesses with an empty-interface type are now wrapped in a dynamically typed getter. At runtime the getter still returns non-value types unchanged, while custom values are unwrapped through their value interface. Added a regression test for values inside a nested map.

Tests: nice -n 19 env GOMAXPROCS=1 go test ./patcher/value -count=1

Copilot AI balanced review requested due to automatic review settings November 25, 2026 20:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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.

ValueGetter is not supported inmap

2 participants