solidity/test/libsolidity/syntaxTests/multiSource/one_source.sol

8 lines
272 B
Solidity
Raw Normal View History

==== Source: SourceName ====
contract A {
uint256 x;
function f() public pure { x = 42; }
}
// ----
// TypeError: (SourceName:53-54): Function declared as pure, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.