aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol')
-rw-r--r--test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol b/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol
index 22855c34..e21037bd 100644
--- a/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol
+++ b/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_fail.sol
@@ -1,7 +1,10 @@
contract C {
+ uint x;
function f() pure public { g(); }
- function g() view public {}
+ function g() view public { x; }
+ function h() view public { i(); }
+ function i() public { x = 2; }
}
// ----
-// TypeError: (44-47): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
-// Warning: (55-82): Function state mutability can be restricted to pure
+// TypeError: (56-59): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".
+// TypeError: (130-133): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.