diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_view.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_view.sol | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_view.sol b/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_view.sol new file mode 100644 index 00000000..49a3139c --- /dev/null +++ b/test/libsolidity/syntaxTests/memberLookup/msg_value_modifier_view.sol @@ -0,0 +1,6 @@ +contract C { + modifier costs(uint _amount) { require(msg.value >= _amount); _; } + function f() costs(1 ether) public view {} +} +// ---- +// Warning: (101-115): This modifier uses "msg.value" and thus the function should be payable. |