diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-12-08 01:20:35 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-12-12 11:20:53 +0800 |
commit | 788612d2efef33aad711646a1ace9dfee6237730 (patch) | |
tree | ea4f403f1bf1bdfe027afa2f3401fdb450feb30a /test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/modifier_pre_access.sol | |
parent | 1476acb8045033a9a3d2e1a1d13c5aaa8ed6942c (diff) | |
download | dexon-solidity-788612d2efef33aad711646a1ace9dfee6237730.tar.gz dexon-solidity-788612d2efef33aad711646a1ace9dfee6237730.tar.zst dexon-solidity-788612d2efef33aad711646a1ace9dfee6237730.zip |
Refactoring of the ControlFlowGraph and use for detecting all uninitialized storage accesses.
Diffstat (limited to 'test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/modifier_pre_access.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/modifier_pre_access.sol | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/modifier_pre_access.sol b/test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/modifier_pre_access.sol new file mode 100644 index 00000000..81618aec --- /dev/null +++ b/test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/modifier_pre_access.sol @@ -0,0 +1,13 @@ +contract C { + uint[] s; + modifier mod(uint[] storage b) { + b[0] = 0; + _; + } + function f() mod(a) internal returns (uint[] storage a) + { + a = s; + } +} +// ---- +// TypeError: (120-121): This variable is of storage pointer type and can be accessed without prior assignment. |