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

Support of constructor with parameters #4

Closed andreibancioiu closed 4 years ago

andreibancioiu commented 4 years ago

From the code it seems that constuctors with parameters are not yet supported.

Though, no error is issued by the compiler (EmitLLVM), but llvm-link throws an error instead.

Example (adding a parameter in the constructor of 0-0-3.sol):

constructor(uint256 something) public {
    ...
}

Error:

llvm-link: /home/.../0-0-3.ll:748:13: error: '@solidity.constructor.uint256' defined with type 'void (i256)*' but expected 'void ()*'
hydai commented 4 years ago

Hi, @andreibancioiu. Thanks for the report.

This is a bug. The expected behavior should be SOLL throws an error.

hydai commented 4 years ago

Hi @andreibancioiu Thanks for your report. We've fixed this issue at 0.0.5 release.

Now, SOLL will throw an error to notify this.

螢幕截圖 2020-01-18 20 39 11