Skip to content

fix: restore v4 numeric-string + number addition behavior#371

Open
SergioChan wants to merge 1 commit intoflosch:masterfrom
SergioChan:fix-342-numeric-string-add
Open

fix: restore v4 numeric-string + number addition behavior#371
SergioChan wants to merge 1 commit intoflosch:masterfrom
SergioChan:fix-342-numeric-string-add

Conversation

@SergioChan
Copy link

@SergioChan SergioChan commented Mar 7, 2026

Summary

  • restore backward-compatible + behavior for mixed string/number operands when the string parses as numeric
  • keep existing string concatenation behavior when the string side is non-numeric
  • add regression tests for "10" + 5, 5 + "10", and non-numeric fallback concatenation

Testing

  • Not run locally: go toolchain is unavailable in this runtime (go: command not found), so go test ./... could not be executed here.
  • Static validation run: git diff --check (no whitespace issues).

Related

Fixes #342

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 7, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
3.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

BC break between v4 and v6 (string/num adding/concatenating)

1 participant