Merge pull request #7556 from ethereum/ice-7550

Check for use of modifiers in invalid contexts
This commit is contained in:
chriseth
2019-10-24 10:32:49 +02:00
committed by GitHub
6 changed files with 33 additions and 7 deletions
@@ -8,5 +8,5 @@ contract test {
}
}
// ----
// TypeError: (58-62): "sha3" has been deprecated in favour of "keccak256"
// TypeError: (101-108): "suicide" has been deprecated in favour of "selfdestruct"
// TypeError: (58-62): "sha3" has been deprecated in favour of "keccak256".
// TypeError: (101-108): "suicide" has been deprecated in favour of "selfdestruct".
@@ -5,4 +5,4 @@ contract C
}
}
// ----
// TypeError: (60-64): "sha3" has been deprecated in favour of "keccak256"
// TypeError: (60-64): "sha3" has been deprecated in favour of "keccak256".
@@ -5,4 +5,4 @@ contract C
}
}
// ----
// TypeError: (60-67): "suicide" has been deprecated in favour of "selfdestruct"
// TypeError: (60-67): "suicide" has been deprecated in favour of "selfdestruct".
@@ -0,0 +1,9 @@
contract test {
modifier mod() { _; }
function f() public {
mod ;
}
}
// ----
// TypeError: (77-80): Modifier can only be referenced in function headers.