Skip to content
New issue

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

Fix constructor call if no constructor exist #416

Merged
merged 2 commits into from
Mar 22, 2020
Merged

Conversation

montyly
Copy link
Member

@montyly montyly commented Mar 22, 2020

This PR fixes when this happens:

contract A{ constructor(uint) }
contract B is A {}
contract C is B{ constructor() A(10) B() {}

C calls B(), which does not exist. Slither incorrectly took A.constructor as the call's target.

This is a quick fix, a long term solution would be to check for the constructor's signature. Unfortunately, this information is not yet created when the conversion is done; the correct fix will require more work.

@montyly montyly merged commit 11e85cc into dev Mar 22, 2020
@montyly montyly deleted the dev-fix-constructor branch March 23, 2020 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant