2021-01-06 14:55:26 +00:00
|
|
|
contract Reverts {
|
|
|
|
constructor(uint) { revert("test message."); }
|
|
|
|
}
|
|
|
|
contract Succeeds {
|
|
|
|
constructor(uint) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
contract C {
|
|
|
|
function f() public returns (Reverts x, string memory txt) {
|
|
|
|
uint i = 3;
|
|
|
|
try new Reverts(i) returns (Reverts r) {
|
|
|
|
x = r;
|
|
|
|
txt = "success";
|
|
|
|
} catch Error(string memory s) {
|
|
|
|
txt = s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function g() public returns (Succeeds x, string memory txt) {
|
|
|
|
uint i = 8;
|
|
|
|
try new Succeeds(i) returns (Succeeds r) {
|
|
|
|
x = r;
|
|
|
|
txt = "success";
|
|
|
|
} catch Error(string memory s) {
|
|
|
|
txt = s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2021-01-06 14:55:26 +00:00
|
|
|
// ----
|
2021-10-12 09:12:18 +00:00
|
|
|
// Warning 8729: (231-245): Contract deployment is only supported in the trusted mode for external calls with the CHC engine.
|
|
|
|
// Warning 8729: (492-507): Contract deployment is only supported in the trusted mode for external calls with the CHC engine.
|