slice.sol 361 B

12345678910111213
  1. contract slice {
  2. function foo(bytes foo) public {
  3. bytes x1 = foo[1:];
  4. bytes x2 = foo[1:2];
  5. bytes x3 = foo[:2];
  6. bytes x4 = foo[:];
  7. }
  8. }
  9. // ---- Expect: diagnostics ----
  10. // warning: 3:24-27: declaration of 'foo' shadows function
  11. // note 3:14-17: previous declaration of function
  12. // error: 4:20-27: slice not supported yet