solidity/test/libsolidity/semanticTests/literals/escape.sol
2022-05-19 20:23:28 +02:00

14 lines
388 B
Solidity

pragma abicoder v2;
contract C
{
function f() public pure returns (uint, bytes1, bytes1) {
bytes memory encoded = abi.encodePacked("\\\\");
return (encoded.length, encoded[0], encoded[1]);
}
}
// ====
// compileToEwasm: also
// ----
// f() -> 2, 0x5c00000000000000000000000000000000000000000000000000000000000000, 0x5c00000000000000000000000000000000000000000000000000000000000000