Skip to content

Conversation

mablr
Copy link
Contributor

@mablr mablr commented Aug 23, 2025

Motivation

Closes #994

Solution

  • Implemented a new method name_by_selector to return the enum variant name based on a given selector.
  • Added unit test

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

…ant retrieval

- Implemented a new method `name_by_selector` in the `CallLikeExpander` to return the enum variant name based on a given selector.
- Added unit test
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

cool

@github-project-automation github-project-automation bot moved this to In Progress in Alloy Aug 24, 2025
…tion signature retrieval

- Implemented a new method `signature_by_selector` to return the function signature based on a given selector.
- moving `VARIANT_NAMES` and `SIGNATURES` to impl to make them public
- Updated the `name_by_selector` method to utilize the new signature retrieval
- Added unit tests for the new functionality in `signature_by_selector_basic`
@mablr mablr requested review from DaniPopes and mattsse August 24, 2025 09:15
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm, pending @DaniPopes

@github-project-automation github-project-automation bot moved this from In Progress to Reviewed in Alloy Aug 25, 2025
@DaniPopes DaniPopes merged commit 428ef77 into alloy-rs:main Aug 25, 2025
61 of 63 checks passed
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature] Expand a function in sol! for enums that returns the name of the variant by selector

3 participants