solidity/test/libsolidity/semanticTests/literals/escape.sol
2020-11-24 14:57:45 +01:00

15 lines
421 B
Solidity

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