stacks-network / clarity-wasm

`clar2wasm` is a compiler for generating WebAssembly from Clarity.
GNU General Public License v3.0
12 stars 9 forks source link

Fixes `replace-at?` with empty replacement #423

Closed Acaccia closed 3 weeks ago

Acaccia commented 3 weeks ago

Simple fix where we check for strings types and the buffer type if the replacement is empty, and throw a runtime error in this case.

Fixes #418

Since I touched this function whose crosscheck test was ignored, I fixed its problem too. It seems it was due to a typechecker error which could be workarounded by setting the types of the arguments.

Fixes #395

(Seems like that issue was poorly assessed: I didn't have any ValueTooLarge after the fix, and I ran thousands of examples)

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.53%. Comparing base (6c1a9cf) to head (72209e8).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #423 +/- ## ======================================= Coverage 86.52% 86.53% ======================================= Files 43 43 Lines 19167 19192 +25 Branches 19167 19192 +25 ======================================= + Hits 16584 16607 +23 - Misses 1118 1120 +2 Partials 1465 1465 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.