Fix too strict assert for calldata string -> bytes conversions

This commit is contained in:
Marenz
2022-01-20 15:11:26 +01:00
parent 0b9ab33fce
commit a550048cf0
4 changed files with 21 additions and 3 deletions
@@ -0,0 +1,11 @@
// Triggered ICE before
contract C {
function f(string calldata data) external pure returns(string memory) {
bytes calldata test = bytes(data[:3]);
return string(test);
}
}
// ====
// compileViaYul: also
// ----
// f(string): 0x20, 3, "123" -> 0x20, 3, "123"