mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
609 B
29 lines
609 B
// This is used to test detection of public mappings with nested variables. This was an issue in Solidity 0.4.x.
|
|
pragma solidity ^0.4.0;
|
|
|
|
contract Bug {
|
|
|
|
struct innerStruct {
|
|
uint x;
|
|
}
|
|
|
|
struct outerStruct {
|
|
innerStruct inner;
|
|
}
|
|
|
|
mapping(uint => outerStruct) public testMapping;
|
|
mapping(uint => uint) public testMapping2;
|
|
mapping(uint => address) public testMapping3;
|
|
|
|
constructor() public {
|
|
testMapping[0].inner.x = 42;
|
|
}
|
|
}
|
|
|
|
contract Test{
|
|
|
|
function f() public returns(uint){
|
|
Bug b = new Bug();
|
|
return b.testMapping(0).x;
|
|
}
|
|
} |