-
Notifications
You must be signed in to change notification settings - Fork 922
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
[Bug]: slither.core.expressions.new_contract.NewContract object's contract_name field is not str #2424
Comments
This was changed purposely in #2370. It used to be a late lookup and caused issues with aliasing. In retrospect, I probably could have replaced uses of |
Ah I see. I didn't update the signature of slither.core.expressions.new_contract.NewContract |
So is this |
Describe the issue:
The contract name for the right expression
C c = new C();
is not strThe way to get the actual contract name is to call newC.contract_name.type.name (is it the intended way?)
I think the bug is caused by the confusion between slither.core.expressions.new_contract.NewContract and slither.slithir.operations.new_contract.NewContract, both have an option contract_name but the first one is of type str, and the second is of type UserDefinedType.
I think the issue arouse in this commit
69ece6d#diff-fd01d1c9135cdceee138701706ce2947d135c9b32bf89253c5ca2f84a54979d9
new = NewContract(contract_type)
Code example to reproduce the issue:
Version:
0.10.2
Relevant log output:
The text was updated successfully, but these errors were encountered: