stacks-network / clarity-wasm

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

Validate `define-x` names #391

Closed Acaccia closed 4 months ago

Acaccia commented 5 months ago

There is currently no checks on the validity of the names given in those functions:

Here is a example of Clarity code that should fail:

>> (define-data-var map int 0)
error: Runtime Error: Runtime error while interpreting ST000000000000000000002AMW42H.contract-0: Unchecked(NameAlreadyUsed("map"))