Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add binding rules for arrays, mappings and other types #1082

Merged
merged 5 commits into from
Aug 21, 2024

Conversation

ggiraldez
Copy link
Collaborator

This PR adds binding rules to allow support name resolution of:

  • Top-level constants (contract/library/interface constants were already supported because they are parsed as state variables)
  • Mappings: both resolving key and value types as well as computing the result type of indexing
  • Arrays: same as above; missing support for array type members, which will be covered when we implement built-ins support
  • User defined value types; same as above to member functions
  • Function types; ditto

Key and value types are resolved, as well as indexing in a mapping
variable will output the correct type to allow chaining, eg. member access
expressions
The type's functions `.wrap()` and `.unwrap()` are not yet defined, since they
will be covered when we start support for builtins.
@ggiraldez ggiraldez requested a review from a team as a code owner August 20, 2024 15:29
Copy link

changeset-bot bot commented Aug 20, 2024

⚠️ No Changeset found

Latest commit: 4b40e18

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ggiraldez ggiraldez mentioned this pull request Aug 20, 2024
34 tasks
@OmarTawfik OmarTawfik added this pull request to the merge queue Aug 21, 2024
@OmarTawfik OmarTawfik removed this pull request from the merge queue due to a manual request Aug 21, 2024
@OmarTawfik OmarTawfik added this pull request to the merge queue Aug 21, 2024
Merged via the queue into NomicFoundation:main with commit d223865 Aug 21, 2024
1 check passed
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