Adding tests for conversion of calldata slices to memory and storage and fixing syntax tests.

This commit is contained in:
Djordje Mijovic
2020-12-15 09:21:47 +01:00
parent 8aa4568b10
commit d479c98920
7 changed files with 106 additions and 7 deletions
@@ -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.