Deprecate the throw statement

This commit is contained in:
Alex Beregszaszi
2018-07-16 15:33:20 +02:00
committed by chriseth
parent 931794001e
commit 21e97da294
5 changed files with 6 additions and 30 deletions
@@ -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()".