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

19 lines
503 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
// ----
// a() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001"
// b() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001"