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

fix(types): forbid "remainder" field at the middle of a contract storage #1301

Merged

Conversation

i582
Copy link
Contributor

@i582 i582 commented Jan 13, 2025

Issue

Closes #765.

This PR actually contains a tiny refactoring, now we have the checkAggregateTypes function with only one loop over all types, instead of two as before (it just looked a bit weird after the initial changes I made). However, I don't think we need 2 PRs here (implementation and refactoring :) False way

Checklist

  • I have run the linter, formatter and spellchecker
  • I have updated CHANGELOG.md
  • I have added tests to demonstrate the contribution is correctly implemented: this usually includes both positive and negative tests, showing the happy path(s) and featuring intentionally broken cases
  • I have run all the tests locally and no test failure was reported

@i582 i582 requested a review from a team as a code owner January 13, 2025 19:44
@anton-trunov anton-trunov added this to the v1.6.0 milestone Jan 14, 2025
CHANGELOG.md Outdated Show resolved Hide resolved
@anton-trunov anton-trunov self-assigned this Jan 14, 2025
@i582 i582 changed the title feat(types): add 'The "remainder" field can only be the last field' inspection for contracts fix(types): forbid "remainder" field at the middle of a contract storage Jan 14, 2025
@anton-trunov anton-trunov merged commit 602e1be into main Jan 14, 2025
17 checks passed
@anton-trunov anton-trunov deleted the pmakhnev/forbid-remaining-field-for-middle-field-of-contract branch January 14, 2025 06:45
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.

Only allow as remaining annotation for last fields of contract storage
2 participants