solidity/test/libsolidity/semanticTests/literals/escape.sol

14 lines
397 B
Solidity
Raw Normal View History

2020-05-07 17:19:54 +00:00
pragma experimental ABIEncoderV2;
contract C
{
function f() public pure returns (uint, byte, byte) {
bytes memory encoded = abi.encodePacked("\\\\");
return (encoded.length, encoded[0], encoded[1]);
}
}
// ====
// compileViaYul: also
// ----
// f() -> 2, 0x5c00000000000000000000000000000000000000000000000000000000000000, 0x5c00000000000000000000000000000000000000000000000000000000000000