From 3c69b7e55259cd4763b724f867d4a972f6b88a6f Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 2 Feb 2021 12:14:19 +0100 Subject: [PATCH] fixup! Code generation for errors. --- .../semanticTests/errors/using_structs.sol | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/libsolidity/semanticTests/errors/using_structs.sol diff --git a/test/libsolidity/semanticTests/errors/using_structs.sol b/test/libsolidity/semanticTests/errors/using_structs.sol new file mode 100644 index 000000000..83af1a79e --- /dev/null +++ b/test/libsolidity/semanticTests/errors/using_structs.sol @@ -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"