Add test for implicit conversion from an array literal into an array of bytes

This commit is contained in:
wechman 2022-06-06 09:13:22 +02:00
parent ce09750656
commit e8038dc834

View File

@ -0,0 +1,8 @@
contract C {
function f() external pure {
bytes[2] memory a1 = ['foo', 'bar'];
bytes[2] memory a2 = [hex'666f6f', hex'626172'];
require(keccak256(a1[0]) == keccak256(a2[0]));
require(keccak256(a1[1]) == keccak256(a2[1]));
}
}