Skip to content

Conversation

@rodiazet
Copy link
Collaborator

Initially reviewed here #16335

This PR fixes assignment to a constant variable of a result of string or bytes concatenation, if their arguments are values known in the compile-time.
Closes: #16188

Additionally

  • Add unit tests
  • Update the Changelog.md
  • Update existing unit tests:
    • Modify tests, which trigger "no-effect" expression warning to silence the warning.
    • Update error message, because now they fail in different (but very similar) way.
    • Add more tests to cover all the builtins

@rodiazet rodiazet changed the title Fix string bytes concat assigment Fix string.concat and bytes.concat assignment to a constant variable. Dec 10, 2025
@rodiazet rodiazet requested a review from cameel December 10, 2025 10:50
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.

bytes.concat cannot be used for initializating constant

2 participants