solidity/test/libsolidity/semanticTests/errors/panic_via_import.sol

20 lines
527 B
Solidity
Raw Normal View History

2021-02-24 09:55:49 +00:00
==== Source: s1.sol ====
error E(uint);
==== Source: s2.sol ====
import { E as Panic } from "s1.sol";
contract C {
error E(uint);
function a() public pure {
revert Panic(1);
}
function b() public pure {
revert E(1);
}
}
// ====
// compileViaYul: also
2021-04-23 15:59:01 +00:00
// compileToEwasm: also
2021-02-24 09:55:49 +00:00
// ----
// a() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001"
// b() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001"