mirror of https://github.com/crytic/slither
Merge pull request #1611 from crytic/dev-yul-constant-variable
Fix support for constant variable lookup in yulpull/1691/head
commit
9997808a6d
Binary file not shown.
@ -0,0 +1,12 @@ |
|||||||
|
{ |
||||||
|
"A": { |
||||||
|
"f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", |
||||||
|
"f2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: INLINE ASM 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", |
||||||
|
"f3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" |
||||||
|
}, |
||||||
|
"B": { |
||||||
|
"f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", |
||||||
|
"f2()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: INLINE ASM 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n}\n", |
||||||
|
"f3()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
contract A{ |
||||||
|
uint private constant a = 10; |
||||||
|
|
||||||
|
function f() public returns(uint){ |
||||||
|
return a; |
||||||
|
} |
||||||
|
|
||||||
|
function f2() public returns(uint){ |
||||||
|
uint ret; |
||||||
|
assembly{ |
||||||
|
ret := a |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function f3() public returns(uint){ |
||||||
|
uint ret; |
||||||
|
unchecked{ |
||||||
|
ret = a; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
contract B is A{ |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue