Merge pull request #4481 from ethereum/disallow-throw

[BREAKING] Deprecate the throw statement
This commit is contained in:
chriseth
2018-07-16 16:25:22 +02:00
committed by GitHub
31 changed files with 112 additions and 136 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()".