mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Deprecate the throw statement
This commit is contained in:
committed by
chriseth
parent
931794001e
commit
21e97da294
@@ -1,9 +0,0 @@
|
||||
contract C {
|
||||
struct S { bool f; }
|
||||
S s;
|
||||
function f() internal pure returns (S storage) {
|
||||
throw;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (108-113): "throw" is deprecated in favour of "revert()", "require()" and "assert()".
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (52-57): "throw" is deprecated in favour of "revert()", "require()" and "assert()".
|
||||
// SyntaxError: (52-57): "throw" is deprecated in favour of "revert()", "require()" and "assert()".
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
pragma experimental "v0.5.0";
|
||||
contract C {
|
||||
function f() pure public {
|
||||
throw;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// SyntaxError: (82-87): "throw" is deprecated in favour of "revert()", "require()" and "assert()".
|
||||
Reference in New Issue
Block a user