solidity/test/libsolidity/semanticTests/errors/panic_via_import.sol
2021-04-23 17:00:01 +01:00

20 lines
527 B
Solidity

==== 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
// compileToEwasm: also
// ----
// a() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001"
// b() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001"