second-state / SOLL

SOLL is a new compiler for generate Ewasm from solidity and yul. See a demo here: https://asciinema.org/a/ezJqNLicn5fya02zwu4VXIo8a
https://www.secondstate.io/
377 stars 23 forks source link

Cannot compile contract with scientific notation literals: "Invalid numeric literal ..." #8

Closed andreibancioiu closed 3 years ago

andreibancioiu commented 4 years ago

Not sure if already reported in the past, but using the scientific notation literal in a contract results in a compilation error.

Example contract:

https://solidity.readthedocs.io/en/v0.5.10/introduction-to-smart-contracts.html#subcurrency-example

function mint(address receiver, uint amount) public {
    require(msg.sender == minter);
    require(amount < 1e60);
    balances[receiver] += amount;
}

Error:

Invalid numeric literal '1e60'.
hydai commented 4 years ago

Thanks for reporting. We haven't implemented scientific notation literal type. This is on our future plan.

hydai commented 3 years ago

Fixed at fc38fd053ffe31f5890593be367eff5b5d6af478