mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[Sol->Yul] Fixing string calldata to bytes calldata conversion.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
function f(bytes calldata c) public returns (string calldata s) {
|
||||
return string(c);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(bytes): 0x20, 3, "abc" -> 0x20, 3, "abc"
|
||||
@@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
function f(string calldata s) public returns (bytes calldata m) {
|
||||
return bytes(s);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(string): 0x20, 3, "abc" -> 0x20, 3, "abc"
|
||||
Reference in New Issue
Block a user