diff options
author | chriseth <chris@ethereum.org> | 2018-03-13 23:50:27 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-03-13 23:55:41 +0800 |
commit | 58af150c3dce26206825122d048e4e0732fcb50f (patch) | |
tree | 03c7d481894890c819af84f69a66d07badde83d8 /test/libsolidity/syntaxTests | |
parent | 069b150e42d12f3f3736dd4af2d82881db244b66 (diff) | |
download | dexon-solidity-58af150c3dce26206825122d048e4e0732fcb50f.tar dexon-solidity-58af150c3dce26206825122d048e4e0732fcb50f.tar.gz dexon-solidity-58af150c3dce26206825122d048e4e0732fcb50f.tar.bz2 dexon-solidity-58af150c3dce26206825122d048e4e0732fcb50f.tar.lz dexon-solidity-58af150c3dce26206825122d048e4e0732fcb50f.tar.xz dexon-solidity-58af150c3dce26206825122d048e4e0732fcb50f.tar.zst dexon-solidity-58af150c3dce26206825122d048e4e0732fcb50f.zip |
Changelog entry.
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r-- | test/libsolidity/syntaxTests/virtualLookup/modifiers_in_libraries.sol | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/virtualLookup/modifiers_in_libraries.sol b/test/libsolidity/syntaxTests/virtualLookup/modifiers_in_libraries.sol new file mode 100644 index 00000000..b033fd0c --- /dev/null +++ b/test/libsolidity/syntaxTests/virtualLookup/modifiers_in_libraries.sol @@ -0,0 +1,14 @@ +library WithModifier { + modifier mod() { require(msg.value > 10 ether); _; } + function withMod(uint self) mod() internal view { require(self > 0); } +} + +contract Test { + using WithModifier for *; + + function f(uint _value) public payable { + _value.withMod(); + WithModifier.withMod(_value); + } +} +// ---- |