From 52ea596ed22813d6a0dbb9dc0f61b17b066b6827 Mon Sep 17 00:00:00 2001 From: Pranav Gaddamadugu <23022326+d0cd@users.noreply.github.com> Date: Wed, 15 May 2024 16:21:56 -0700 Subject: [PATCH] Add failing test --- .../finalize/only_finalize_with_flattening.leo | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/tests/compiler/finalize/only_finalize_with_flattening.leo b/tests/tests/compiler/finalize/only_finalize_with_flattening.leo index d1a37eccac..86c433ede8 100644 --- a/tests/tests/compiler/finalize/only_finalize_with_flattening.leo +++ b/tests/tests/compiler/finalize/only_finalize_with_flattening.leo @@ -32,6 +32,20 @@ program test.aleo { return; } } + + transition add_new_liquidity_token2 () { + return then finalize(); + } + + finalize add_new_liquidity_token2() { + let try_get_token: TokenInfo = Mapping::get_or_use( + token_name_to_info, + 0field, + TokenInfo { id: 0u64 } + ); + try_get_token = (try_get_token.id == 0u64) ? TokenInfo { id: 10u64 } : try_get_token; + return; + } }