You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Troublor
changed the title
[Bug-Candidate]: Incorrect type hint in Member, Index, Binary IR operation
[Bug-Candidate]: Incorrect type hint in Member, Index, Binary, and other IR operations
Apr 6, 2023
I think the release only contained partial updates to the typing and further improvement were merged after the release. You may want to use dev to reflect the changes from #1666
I think the release only contained partial updates to the typing and further improvement were merged after the release. You may want to use dev to reflect the changes from #1666
I see. Thx.
So there are some bad unexpected changes to the type hint in the 0.9.3 release, and they have been fixed in the dev branch.
OK, so this is no longer an issue.
It is really a pain in the ass to have incorrect type hints in the released version, though. 🫠
Describe the issue:
In slither version
0.9.3
, it seems the type hint of variable fields in some IR operation class is changed toSourceMapping
.For example,
slither/slither/slithir/operations/member.py
Line 53 in 0ec4874
slither/slither/slithir/operations/index.py
Line 43 in 0ec4874
slither/slither/slithir/operations/binary.py
Line 137 in 0ec4874
These are just three examples in three operation class.
There could be other places with wrong type hint and I didn't enumerate all of them.
I believe this is a regression issue.
Before
0.9.3
, the type hint was some class related toVariable
.Upgrading to
0.9.3
breaks all the type check in my program, which is a downstream tool using of slithIR.Is this a breaking change? It seems not to me. The type of these variable (e.g.,
left_variable
) beingSourceMapping
makes no sense to me.Code example to reproduce the issue:
N/A
Version:
0.9.3
Relevant log output:
The text was updated successfully, but these errors were encountered: