duaraghav8/Ethlint

fatal error on abi.decode with dynamic type

Opened this issue · 3 comments

ldct commented

Description
Solium reports fatal error on abi.decode with dynamic type

Steps to reproduce

Using the following solidity file:

pragma solidity 0.5.7;
pragma experimental "ABIEncoderV2";

contract Decoder {
  function interpret(bytes memory input) public {
    uint256[] memory ret = abi.decode(input, (uint256[]));
  }
}
➜  default-apps git:(ldct/transfer) ✗ yarn run solium -f contracts/default-apps/Decoder.sol
yarn run v1.13.0
$ /Users/xuanji/gits/cf/monorepo/packages/contracts/node_modules/.bin/solium -f contracts/default-apps/Decoder.sol
✖ [Fatal error] An error occured while linting over contracts/default-apps/Decoder.sol:
Cannot read property 'type' of null
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected behavior
Since solc successfully compiles this file, solium should not exit with a fatal error; either lint the file or report a rule violation.

Operating System
MacOS

Linter version
1.2.4

➜  default-apps git:(ldct/transfer) ✗ yarn run solium --version
yarn run v1.13.0
$ /Users/xuanji/gits/cf/monorepo/packages/contracts/node_modules/.bin/solium --version
Solium version 1.2.4
✨  Done in 0.56s.

Thanks for reporting @IIIIllllIIIIllllIIIIllllIIIIllllIIIIll
I'm able to reproduce this, will ship the fix in the next release.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.5 ETH (92.9 USD @ $185.8/ETH) attached to it as part of the dydxprotocol fund.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Workers have applied to start work.

These users each claimed they can complete the work by 2 years, 6 months ago.
Please review their action plans below:

1) ayoalfonso has applied to start work (Funders only: approve worker | reject worker).

  1. Clone the repo
  2. The issue is with that particular yarn package module
  3. Fix it, re-run test and make PR

Learn more on the Gitcoin Issue Details page.