From 766d10b848684596e4fd6af026fa16d45b10ad18 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 3 Nov 2021 17:12:58 +0100 Subject: [PATCH] Tests. --- .../controlFlowSideEffects/nondisambiguated.yul | 14 +++++++++----- test/libyul/controlFlowSideEffects/recursion.yul | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/test/libyul/controlFlowSideEffects/nondisambiguated.yul b/test/libyul/controlFlowSideEffects/nondisambiguated.yul index c3ed84bda..4cc68c140 100644 --- a/test/libyul/controlFlowSideEffects/nondisambiguated.yul +++ b/test/libyul/controlFlowSideEffects/nondisambiguated.yul @@ -1,7 +1,7 @@ { function a() { { - function b() { if calldataloda(0) { return(0, 0) } } + function b() { if calldataload(0) { return(0, 0) } } b() } { @@ -9,11 +9,15 @@ b() } } - function b() { - leave - revert(0, 0) + { + function b() { + leave + revert(0, 0) + } } } // ---- -// a: can revert +// a: can terminate, can revert +// b: can terminate, can continue +// b: can revert // b: can continue diff --git a/test/libyul/controlFlowSideEffects/recursion.yul b/test/libyul/controlFlowSideEffects/recursion.yul index c4176d502..69cd4a2da 100644 --- a/test/libyul/controlFlowSideEffects/recursion.yul +++ b/test/libyul/controlFlowSideEffects/recursion.yul @@ -31,7 +31,7 @@ // b: can revert // c: // d: -// reg: can continue // x: // y: // z: +// reg: can continue