Allow ABI encoding for array slices without explicit casts.

This commit is contained in:
Daniel Kirchner
2020-05-13 18:20:07 +02:00
parent e9446475bb
commit 97296d8622
9 changed files with 214 additions and 24 deletions
@@ -0,0 +1,8 @@
contract c {
bytes public b;
function f() public {
b = msg.data[:];
}
}
// ----
// TypeError: (63-74): Type bytes calldata slice is not implicitly convertible to expected type bytes storage ref.
@@ -4,4 +4,3 @@ contract C {
}
}
// ----
// TypeError: (85-91): This type cannot be encoded.