mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adding tests for conversion of calldata slices to memory and storage and fixing syntax tests.
This commit is contained in:
@@ -5,4 +5,3 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 7407: (63-74): Type bytes calldata slice is not implicitly convertible to expected type bytes storage ref.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
contract C {
|
||||
function f(bytes calldata x) external {
|
||||
bytes memory y = x[1:2];
|
||||
function f(bytes calldata x) external pure returns (bytes memory) {
|
||||
return x[1:2];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9574: (65-88): Type bytes calldata slice is not implicitly convertible to expected type bytes memory.
|
||||
}
|
||||
@@ -4,4 +4,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9553: (79-85): Invalid type for argument in function call. Invalid implicit conversion from bytes calldata slice to bytes memory requested.
|
||||
|
||||
Reference in New Issue
Block a user