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
library D
{
function double(uint self) public returns (uint) {
// do something with side effects
return 2*self;
}
}
contract C {
using D for uint;
function f(uint a) public returns (uint) {
return a.double();
}
}
// ----
// Warning 2018: (12-79): Function state mutability can be restricted to pure
This is a test case from Solidity. We assume that double function will do something with side effects to modify the storage of C, so it’s not declared as internal pure.
It is not possible both in Solidity++ 0.4 or 0.8, because the DELEGATECALL instruction is not implemented on Vite VM and some functionalities of libraries are disabled in the compiler.
The text was updated successfully, but these errors were encountered:
This is a test case from Solidity. We assume that double function will do something with side effects to modify the storage of C, so it’s not declared as internal pure.
It is not possible both in Solidity++ 0.4 or 0.8, because the DELEGATECALL instruction is not implemented on Vite VM and some functionalities of libraries are disabled in the compiler.
The text was updated successfully, but these errors were encountered: