Commit c19b9446 authored by soad003's avatar soad003

StaticAnalysis: selfdestruct terminal, bugfix return, another testcase

parent 93ba8eb6
...@@ -397,7 +397,7 @@ function isFunctionDefinition (node) { ...@@ -397,7 +397,7 @@ function isFunctionDefinition (node) {
} }
function isStatement (node) { function isStatement (node) {
return nodeType(node, 'Statement$') || isBlock(node) return nodeType(node, 'Statement$') || isBlock(node) || isReturn(node)
} }
function isBlock (node) { function isBlock (node) {
......
...@@ -474,7 +474,7 @@ test('Integration test selfdestruct.js', function (t) { ...@@ -474,7 +474,7 @@ test('Integration test selfdestruct.js', function (t) {
'selfdestruct.sol': 3, 'selfdestruct.sol': 3,
'deleteDynamicArray.sol': 0, 'deleteDynamicArray.sol': 0,
'blockLevelCompare.sol': 0, 'blockLevelCompare.sol': 0,
'intDivisionTruncate.sol': 1 'intDivisionTruncate.sol': 2
} }
runModuleOnFiles(module, t, (file, report) => { runModuleOnFiles(module, t, (file, report) => {
......
...@@ -21,8 +21,9 @@ contract CharityCampaign { ...@@ -21,8 +21,9 @@ contract CharityCampaign {
return fee; return fee;
} }
function endCampaign() public { function endCampaign() public returns (bool) {
require(msg.sender == processor || msg.sender == beneficiary); require(msg.sender == processor || msg.sender == beneficiary);
selfdestruct(beneficiary); selfdestruct(beneficiary);
return true;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment