Skip to content

fix: Implement interpretation of member access on tuples#5311

Merged
jfecher merged 6 commits intojf/type-def-apifrom
jf/fix-interpreter-member-access
Jun 24, 2024
Merged

fix: Implement interpretation of member access on tuples#5311
jfecher merged 6 commits intojf/type-def-apifrom
jf/fix-interpreter-member-access

Conversation

@jfecher
Copy link
Contributor

@jfecher jfecher commented Jun 21, 2024

Description

Problem*

Resolves

Summary*

Fixes an issue in the interpreter where the interpreter would error for member access expressions on tuples. This prevented e.g. my_tuple.0.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@jfecher jfecher requested a review from a team June 21, 2024 19:54
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
# Description

## Problem\*

## Summary\*

Implements `slice_push_back` in the comptime interpreter. This was
needed in the vertical slice example to build a slice of quoted fields
for the type in the impl.

## Additional Context

With this a slightly modified version of the vertical slice code now
runs. Notably:
- Generic functions do not work, so a `map` function like in the
original cannot be used
- An annotation function can return a quoted impl, but the impl isn't
actually inserted into the program yet. So the derived impl does nothing
currently.

## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
@jfecher jfecher merged commit b94662e into jf/type-def-api Jun 24, 2024
@jfecher jfecher deleted the jf/fix-interpreter-member-access branch June 24, 2024 18:21
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.

3 participants