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

feat: &&=, ||=, >>=, <<= operators #853

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Gusarich
Copy link
Member

@Gusarich Gusarich commented Sep 19, 2024

Issue

Closes #811.

Checklist

  • I have updated CHANGELOG.md
  • I have documented my contribution in Tact Docs: https://github.com/tact-lang/tact-docs/pull/PR-NUMBER
  • 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
  • I have run the linter, formatter and spellchecker
  • I did not do unrelated and/or undiscussed refactorings

@Gusarich Gusarich requested a review from a team as a code owner September 19, 2024 19:47
@Gusarich Gusarich added this to the v1.6.0 milestone Sep 19, 2024
tailType.name !== "Int" ||
tailType.optional
) {
if (!isAugmentedAssignExpression(s, ctx)) {
throwCompilationError(
`Type error: Augmented assignment is only allowed for Int type`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably the error message needs to be changed to "Type error: Augmented assignment is only allowed for Int and Bool types". Although, I wonder if it would be possible to make it more specific like "Augmented assignment &&= is only allowed for Bool type", and "Augmented assignment += is only allowed for Int type".

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.

Add logical assignment operators &&= and ||=
2 participants