Merge remote-tracking branch 'origin/develop' into breaking

This commit is contained in:
chriseth
2020-06-10 11:30:50 +02:00
60 changed files with 889 additions and 391 deletions
@@ -1,15 +1,7 @@
contract C {
struct S { bool f; }
S s;
function f(uint256 a) internal pure {
S storage c;
assembly {
switch a
default { c_slot := s_slot }
}
c;
}
function g(bool flag) internal pure {
function f(bool flag) internal pure {
S storage c;
assembly {
switch flag
@@ -18,7 +10,7 @@ contract C {
}
c;
}
function h(uint256 a) internal pure {
function g(uint256 a) internal pure {
S storage c;
assembly {
switch a
@@ -1,20 +1,14 @@
contract C {
struct S { bool f; }
S s;
function f(uint256 a) internal pure returns (S storage c) {
assembly {
switch a
default { c_slot := s_slot }
}
}
function g(bool flag) internal pure returns (S storage c) {
function f(bool flag) internal pure returns (S storage c) {
assembly {
switch flag
case 0 { c_slot := s_slot }
default { c_slot := s_slot }
}
}
function h(uint256 a) internal pure returns (S storage c) {
function g(uint256 a) internal pure returns (S storage c) {
assembly {
switch a
case 0 { revert(0, 0) }
@@ -0,0 +1,12 @@
contract C {
struct S { bool f; }
S s;
function f(uint256 a) internal pure returns (S storage c) {
assembly {
switch a
default { c_slot := s_slot }
}
}
}
// ----
// Warning: (142-195): "switch" statement with only a default case.