JoinColony / solcover

Code coverage for solidity
MIT License
64 stars 8 forks source link

Support for "using SomeLib for *" syntax #64

Closed nrchandan closed 7 years ago

nrchandan commented 7 years ago

I use solidity-stringutils by Arachnid (https://github.com/Arachnid/solidity-stringutils) which relies on the "using strings for *" syntax. This doesn't seem to be supported at the moment:

/Users/.../solcover/parse.js:165
  parse[expression.for.type](contract, expression.for);
                            ^

TypeError: parse[expression.for.type] is not a function
    at Object.parseUsingStatement [as UsingStatement] (/Users/.../solcover/parse.js:165:29)
    at expression.body.forEach.construct (/Users/.../solcover/parse.js:193:26)
    at Array.forEach (native)
    at Object.parseContractOrLibraryStatement [as ContractOrLibraryStatement] (/Users/.../solcover/parse.js:192:19)
    at Object.ParseContractStatement [as ContractStatement] (/Users/.../solcover/parse.js:198:9)
    at expression.body.forEach.construct (/Users/.../solcover/parse.js:212:26)
    at Array.forEach (native)
    at Object.parseProgram [as Program] (/Users/.../solcover/parse.js:211:19)
    at instrumentSolidity (/Users/.../solcover/instrumentSolidity.js:26:18)
    at shell.ls.forEach.file (/Users/.../solcover/runCoveredTests.js:43:38)
nrchandan commented 7 years ago

This issue has been resolved in the fork https://github.com/sc-forks/solidity-coverage