mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7556 from ethereum/ice-7550
Check for use of modifiers in invalid contexts
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user