[FIXUP] Remove ViewPureChecker literal tests

This commit is contained in:
Kamil Śliwak 2022-07-22 15:33:56 +02:00
parent 2678e986b7
commit ccb913b244
2 changed files with 0 additions and 49 deletions

View File

@ -1,16 +0,0 @@
function viewSuffix(uint) view returns (uint) {}
function mutableSuffix(uint) returns (uint) {}
contract C {
function pureFunction() pure public {
1 viewSuffix; // TODO: Should be disallowed
1 mutableSuffix; // TODO: Should be disallowed
}
// TODO: There should be no mutability restriction suggestion
function viewFunction() view public {
1 mutableSuffix; // TODO: Should be disallowed
}
}
// ----
// Warning 2018: (341-440): Function state mutability can be restricted to pure

View File

@ -1,33 +0,0 @@
function pureSuffix(uint) view returns (uint) {}
function viewSuffix(uint) view returns (uint) {}
function mutableSuffix(uint) returns (uint) {}
contract C {
function pureFunction() pure public {
1 pureSuffix;
}
// TODO: There should be no mutability restriction suggestion
function viewFunction() view public {
1 pureSuffix;
1 viewSuffix;
}
// TODO: There should be no mutability restriction suggestion
function mutableFunction() public {
1 pureSuffix;
1 viewSuffix;
1 mutableSuffix;
}
// TODO: There should be no mutability restriction suggestion
function payableFunction() public {
1 pureSuffix;
1 viewSuffix;
1 mutableSuffix;
}
}
// ----
// Warning 2018: (300-387): Function state mutability can be restricted to pure
// Warning 2018: (459-569): Function state mutability can be restricted to pure
// Warning 2018: (641-751): Function state mutability can be restricted to pure