mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add test for implicit conversion from an array literal into an array of bytes
This commit is contained in:
parent
ce09750656
commit
e8038dc834
@ -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]));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user