solidity/test/libsolidity/syntaxTests/controlFlow/localStorageVariables/try_declaration_fine.sol
2021-04-20 17:38:29 +02:00

32 lines
604 B
Solidity

contract C {
struct S { bool f; }
S s;
function ext() external { }
function f() internal
{
S storage r;
try this.ext() { r = s; }
catch (bytes memory) { r = s; }
r;
}
function g() internal
{
S storage r;
try this.ext() { r = s; }
catch Error (string memory) { r = s; }
catch (bytes memory) { r = s; }
r;
}
function h() internal
{
S storage r;
try this.ext() { }
catch (bytes memory) { }
r = s;
r;
}
}
// ====
// EVMVersion: >=byzantium
// ----