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

Change index expression's start position #3575

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

RZhang05
Copy link
Contributor

@RZhang05 RZhang05 commented Sep 9, 2024

Closes #718

Description

This PR adds a test which throws an error involving index expression different from the type mismatch error addressed in #719. Index expression's start position was changed from opening square bracket to indexed expression's start position.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Start position changed from opening square bracket to indexed expression's start position.
Copy link
Member

@SupunS SupunS left a comment

Choose a reason for hiding this comment

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

First contribution! 👏 Thank you for opening a PR to fix this!

Looks like there are some tests failing, due to the updated position info. Can you please update those tests as well? https://github.com/onflow/cadence/actions/runs/10775433087/job/29882238324?pr=3575
You can also run make test from the root directory of the repo, to run all tests locally.

runtime/parser/expression.go Show resolved Hide resolved
runtime/account_test.go Outdated Show resolved Hide resolved
@SupunS SupunS self-assigned this Sep 9, 2024
Clean up code, update tests to reflect changes.
Copy link
Member

@SupunS SupunS left a comment

Choose a reason for hiding this comment

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

Nice work! 🎉

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Great work on your first PR! 👏

@SupunS SupunS merged commit ac0c01c into onflow:master Sep 10, 2024
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change indexing expression start position to indexed expression's start position
3 participants