mirror of https://github.com/crytic/slither
Merge pull request #1563 from crytic/fix-usingfor
Improve support using for with aliasingpull/1568/head
commit
a9ee1371ef
Binary file not shown.
Binary file not shown.
@ -0,0 +1,9 @@ |
||||
{ |
||||
"C": { |
||||
"topLevel(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", |
||||
"libCall(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" |
||||
}, |
||||
"Lib": { |
||||
"b(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
{ |
||||
"Lib": { |
||||
"b(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" |
||||
}, |
||||
"C": { |
||||
"topLevel(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", |
||||
"libCall(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n" |
||||
} |
||||
} |
@ -0,0 +1,14 @@ |
||||
import "./using-for-alias-dep1.sol"; |
||||
|
||||
contract C { |
||||
using {T3.a, T3.Lib.b} for uint256; |
||||
|
||||
function topLevel(uint256 value) public { |
||||
value.a(); |
||||
} |
||||
|
||||
function libCall(uint256 value) public { |
||||
value.b(); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,11 @@ |
||||
import "./using-for-alias-dep2.sol" as T3; |
||||
|
||||
function b(uint256 value) returns(bool) { |
||||
return true; |
||||
} |
||||
|
||||
library Lib { |
||||
function a(uint256 value) public returns(bool) { |
||||
return true; |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
function a(uint256 value) returns(bool) { |
||||
return true; |
||||
} |
||||
|
||||
library Lib { |
||||
function b(uint256 value) public returns(bool) { |
||||
return true; |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
import "./using-for-alias-dep1.sol"; |
||||
|
||||
using {T3.a, T3.Lib.b} for uint256; |
||||
|
||||
contract C { |
||||
|
||||
function topLevel(uint256 value) public { |
||||
value.a(); |
||||
} |
||||
|
||||
function libCall(uint256 value) public { |
||||
value.b(); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue