Skip to content

Fix resolution of parameterized dictionary subscriptions#457

Merged
san-zrl merged 1 commit into
cbomkit:mainfrom
somiljain2006:Dictioniary-subscription-bug
Jun 8, 2026
Merged

Fix resolution of parameterized dictionary subscriptions#457
san-zrl merged 1 commit into
cbomkit:mainfrom
somiljain2006:Dictioniary-subscription-bug

Conversation

@somiljain2006

Copy link
Copy Markdown
Contributor

Fixes #10

Fix the resolution of dictionary subscriptions using function parameters. Preserve argument mappings when resolving subscription expressions and re-resolve outer-scope hook expressions using call-site arguments. This allows expressions such as _curveTable[curve] to resolve through dictionary lookups and correctly identify values like SECP256R1. Added a regression test.

@somiljain2006
somiljain2006 requested a review from a team as a code owner May 29, 2026 19:32
@somiljain2006
somiljain2006 force-pushed the Dictioniary-subscription-bug branch from 09be5fd to 00bdf04 Compare May 29, 2026 19:33
@somiljain2006

Copy link
Copy Markdown
Contributor Author

@n1ckl0sk0rtge Can you review this pr?

@san-zrl san-zrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Fixes resolution of parameterized dictionary subscription #10
  • Correctly resolves dictionary values (not keys) when parameters are used as indices
  • Works with any subscription index type (string, int, bytes) that can be resolved to a literal
  • All tests pass in CI and locally (after proper clean build)
  • Adds appropriate test coverage for the new functionality

@san-zrl
san-zrl merged commit 7a777c1 into cbomkit:main Jun 8, 2026
2 checks passed
@san-zrl san-zrl self-assigned this Jun 8, 2026
@somiljain2006
somiljain2006 deleted the Dictioniary-subscription-bug branch June 8, 2026 14:54
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.

Resolution for an outer parameter that is used in a subscription expression

2 participants