Open ItsNickBarry opened 11 months ago
Solidity currently generally doesn't have compile-time constant expression evaluation - we plan to change that in the future and this will extend to bytes.concat
as well, so I'm closing this issue as covered by https://github.com/ethereum/solidity/issues/3157
EDIT: actually, looking at it again, the divergence between abi.encodePacked
and bytes.concat
is inconsistent - sorry, I didn't look properly earlier. There is no compile-time constant evaluation happening for abi.encodePacked
, but the expression is allowed as constant
and inlined - we can look into doing the same for bytes.concat
for consistency, even though ideally this would be covered by proper compile-time constant expression evaluation a la https://github.com/ethereum/solidity/issues/3157
I am new to this repository , can someone guide me about how can I help in solving this issue? Do we need to implement the concat
function taking inputs as const
initializers as well? And if yes, where can I find its implementation? @ekpyron
Description
bytes.concat
does not work when defining constants.Environment
Steps to Reproduce
This code compiles:
This does not: