mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix too strict assert for calldata string -> bytes conversions
This commit is contained in:
+11
@@ -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"
|
||||
Reference in New Issue
Block a user