Timeline for on the implicit type conversion rules in Solidity
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 5, 2020 at 1:49 | comment | added | ali | see this part of documentation which addresses your question link | |
Dec 2, 2020 at 1:08 | comment | added | formal |
Then why does u3=u2 work without runtime or compilation errors? At the function call site test2(u2) , it can be thought that there is an assignment arr=u2 (where arr is a formal parameter of test2 ). In other words, I wonder why u3=u2 works but arr=u2 does not work. This is the confusing part to me and why I asked question.
|
|
Dec 1, 2020 at 0:35 | comment | added | ali |
its clear. the function test2 expects three ints, which is 256x3 bits, but it receives only two ints which is 256x2 bits
|
|
Nov 24, 2020 at 6:15 | comment | added | formal |
Why does the code has a run time error? In my example, the statement u3=u2; can be successfully executed; I checked this in Remix with solc(v 0.7.4).
|
|
Nov 23, 2020 at 6:03 | review | Late answers | |||
Nov 23, 2020 at 13:41 | |||||
Nov 23, 2020 at 5:48 | history | answered | ali | CC BY-SA 4.0 |