Open abarmat opened 4 years ago
Description Syntax error when using array slice on a bytes datatype as allowed in Solidity 0.6
Steps to reproduce
pragma solidity ^0.6.0; contract Demo { event Log(bytes value); function log(bytes calldata value) external { emit Log(bytes(value[0:10])); } }
solium --dir ./contracts
{ "extends": "solium:recommended", "plugins": ["security"], "rules": { "no-experimental": ["off"], "quotes": ["error", "double"], "indentation": ["error", 4], "linebreak-style": ["error", "unix"], "security/no-inline-assembly": ["off"], "security/no-low-level-calls": ["off"] } }
Expected behavior The usage of array slicing on bytes calldata types should not be considered syntax error.
bytes calldata
Solidity Documentation https://solidity.readthedocs.io/en/v0.6.0/types.html#array-slices
Operating System MacOS
Linter version 1.2.5
Thanks for reporting this @abarmat Solidity 0.6 is currently not supported by Ethlint's internal parser, so I can confirm that this is an issue on all platforms.
Description Syntax error when using array slice on a bytes datatype as allowed in Solidity 0.6
Steps to reproduce
Demo.sol
Run with:
solium --dir ./contracts
.soliumrc.json
Expected behavior The usage of array slicing on
bytes calldata
types should not be considered syntax error.Solidity Documentation https://solidity.readthedocs.io/en/v0.6.0/types.html#array-slices
Operating System MacOS
Linter version 1.2.5