We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instrumenting the following sample:
contract CallinInstrumentedFun { uint x = 1; /// if_succeeds res > 0; function getX() public view returns (uint res) { return x; } /// if_succeeds res == x + getX(); function inc(uint x) public returns (uint res) { return x + getX(); } }
Produces this exception:
/home/dimo/work/consensys/scribble-clean/dist/bin/scribble.js:574 throw e; ^ Error: Internal error: variable id getX has different name from underlying variable FunctionDefinition #208 id: 208 src: "2967:72:0" type: "FunctionDefinition" implemented: true virtual: false scope: 204 kind: "function" name: "_original_CallinInstrumentedFun_getX" visibility: "private" stateMutability: "view" isConstructor: false documentation: undefined nameLocation: undefined vParameters: ParameterList #210 vReturnParameters: ParameterList #211 vModifiers: Array(0) vOverrideSpecifier: undefined vBody: Block #214 context: ASTContext #2 parent: ContractDefinition #204 <getter> children: Array(3) [ ParameterList #210, ParameterList #211, Block #214 ] <getter> vScope: ContractDefinition #204 <getter> canonicalSignature: "_original_CallinInstrumentedFun_getX()" <getter> canonicalSignatureHash: "28cc8fb6" <getter> firstChild: ParameterList #210 <getter> lastChild: Block #214 <getter> previousSibling: FunctionDefinition #804 <getter> nextSibling: FunctionDefinition #846 <getter> root: SourceUnit #0 <getter> sourceInfo: Object { offset: 2967, length: 72, sourceIndex: 0 } at generateIdAST (/home/dimo/work/consensys/scribble-clean/dist/instrumenter/transpile.js:129:15) at generateExprAST (/home/dimo/work/consensys/scribble-clean/dist/instrumenter/transpile.js:154:16) at generateExprAST (/home/dimo/work/consensys/scribble-clean/dist/instrumenter/transpile.js:215:22) at generateExprAST (/home/dimo/work/consensys/scribble-clean/dist/instrumenter/transpile.js:188:23) at Object.generateExprAST (/home/dimo/work/consensys/scribble-clean/dist/instrumenter/transpile.js:188:23) at /home/dimo/work/consensys/scribble-clean/dist/instrumenter/instrument.js:436:74 at Array.map (<anonymous>) at generateExpressions (/home/dimo/work/consensys/scribble-clean/dist/instrumenter/instrument.js:436:44) at FunctionInstrumenter.instrument (/home/dimo/work/consensys/scribble-clean/dist/instrumenter/instrument.js:792:29) at instrumentFiles (/home/dimo/work/consensys/scribble-clean/dist/bin/scribble.js:161:34)
This is due to an overzealous check in generateIdAST. Fix is to remove the check.
generateIdAST
The text was updated successfully, but these errors were encountered:
cd1m0
Successfully merging a pull request may close this issue.
Instrumenting the following sample:
Produces this exception:
This is due to an overzealous check in
generateIdAST
. Fix is to remove the check.The text was updated successfully, but these errors were encountered: