From 18bf89418a083d0824471b9772ef5b3d399280f4 Mon Sep 17 00:00:00 2001 From: KtorZ Date: Tue, 13 Dec 2022 22:42:37 +0100 Subject: [PATCH] Fix codegen for binary operator 'or' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a && b → if a { b } else { false } a || b → if a { true } else { b } --- crates/lang/src/uplc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lang/src/uplc.rs b/crates/lang/src/uplc.rs index 029a6eac..6cc2f72e 100644 --- a/crates/lang/src/uplc.rs +++ b/crates/lang/src/uplc.rs @@ -1903,7 +1903,7 @@ impl<'a> CodeGenerator<'a> { argument: left.into(), } .into(), - argument: Term::Delay(Term::Constant(UplcConstant::Bool(false)).into()) + argument: Term::Delay(Term::Constant(UplcConstant::Bool(true)).into()) .into(), } .into(),