You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call a function that doens't exist, the program still compiles however it seems calling any function does nothing.
Here is a repro
define public @"testBad()"() {
entry:
// note that there is no function called foo in this contract
%temp = call @foo()
}
define public @"getVal()"() {
entry:
// calling this function returns nothing
ret 0x0100
}
define @init() {
entry:
ret void
}
}
The text was updated successfully, but these errors were encountered:
So, it looks like iele-assemble successfully generates bytecode for this contract, but check-iele shows that the contract is still ill-formed. Probably we want to implicitly check for well-formedness when we assemble the contract, but for now, this is working as intended and the reason you get no return value when you try to call getVal() is because the contract failed to upload due to being ill-formed.
I guess the real suggestion would be for the Remix IDE to report error codes when you make a non-blockchain call instead of printing nothing and to make blockchain call errors more visible (esp. not well formed since it visually looks like everything work unless you check the status of your transaction)
If you
call
a function that doens't exist, the program still compiles however it seems calling any function does nothing.Here is a repro
The text was updated successfully, but these errors were encountered: