mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixup! Code generation for errors.
This commit is contained in:
parent
14a5c76f17
commit
3c69b7e552
15
test/libsolidity/semanticTests/errors/using_structs.sol
Normal file
15
test/libsolidity/semanticTests/errors/using_structs.sol
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
struct S { uint a; string b; }
|
||||||
|
error E(uint a, S, uint b);
|
||||||
|
contract C {
|
||||||
|
S s;
|
||||||
|
function f(bool c) public {
|
||||||
|
s.a = 9;
|
||||||
|
s.b = "abc";
|
||||||
|
require(c, E(2, s, 7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// compileViaYul: also
|
||||||
|
// ----
|
||||||
|
// f(bool): true ->
|
||||||
|
// f(bool): false -> FAILURE, hex"e96e07f0", 2, 0x60, 7, 9,0x40, 3, "abc"
|
||||||
Loading…
Reference in New Issue
Block a user