You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Function declared as view, but this expression (potentially) modifies the state and thus requires the default.
File (ErrorA.sol):
pragma ton-solidity >=0.38.2;
library A {
function calc(uint128 value) public pure returns (uint128) {
return value++;
}
}
contract B {
uint128 constant VAL = 1;
function make() external view {
A.calc(VAL);
}
}
As you can see there are:
no state variables that can be modified
all vars are constants
library function is pure itself.
Still, compiler shows error. Tested with 0.38.2.
The text was updated successfully, but these errors were encountered:
Here is what I get:
File (ErrorA.sol):
As you can see there are:
Still, compiler shows error. Tested with 0.38.2.
The text was updated successfully, but these errors were encountered: