diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-03-15 00:20:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-15 00:20:51 +0800 |
commit | 59658afa30f434b3a2501c72d4a033af550462b0 (patch) | |
tree | f258c7e625cc28efffc67abef04b0e0d3b0cf111 /test/libsolidity/syntaxTests | |
parent | c3f07b5294893414fd8ed1a04972fe52426ec9a9 (diff) | |
parent | 51f9e350b152483968391757155189ed0880c755 (diff) | |
download | dexon-solidity-59658afa30f434b3a2501c72d4a033af550462b0.tar dexon-solidity-59658afa30f434b3a2501c72d4a033af550462b0.tar.gz dexon-solidity-59658afa30f434b3a2501c72d4a033af550462b0.tar.bz2 dexon-solidity-59658afa30f434b3a2501c72d4a033af550462b0.tar.lz dexon-solidity-59658afa30f434b3a2501c72d4a033af550462b0.tar.xz dexon-solidity-59658afa30f434b3a2501c72d4a033af550462b0.tar.zst dexon-solidity-59658afa30f434b3a2501c72d4a033af550462b0.zip |
Merge pull request #3722 from ethereum/fixMods
Fix modifier lookup in libraries.
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); + } +} +// ---- |