From 010024fb9520cdb88179a2d885c53025e9b0d86f Mon Sep 17 00:00:00 2001 From: Kasey White Date: Tue, 27 Dec 2022 21:01:54 -0500 Subject: [PATCH] fix: acceptance test 031 Co-authored-by: rvcas --- crates/aiken-lang/src/tipo/expr.rs | 2 +- examples/acceptance_tests/031/lib/tests.ak | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/aiken-lang/src/tipo/expr.rs b/crates/aiken-lang/src/tipo/expr.rs index a851cb69..4f42c8ca 100644 --- a/crates/aiken-lang/src/tipo/expr.rs +++ b/crates/aiken-lang/src/tipo/expr.rs @@ -1505,7 +1505,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> { self.unify(bool(), condition.tipo(), condition.type_defining_location())?; - let body = self.infer(first.body.clone())?; + let body = self.infer(branch.body.clone())?; self.unify(tipo.clone(), body.tipo(), body.type_defining_location())?; diff --git a/examples/acceptance_tests/031/lib/tests.ak b/examples/acceptance_tests/031/lib/tests.ak index 8add4a60..566a09c8 100644 --- a/examples/acceptance_tests/031/lib/tests.ak +++ b/examples/acceptance_tests/031/lib/tests.ak @@ -1,4 +1,4 @@ -pub fn clamp(n: Int, min min: Int, max max: Int) -> Int { +pub fn clamp(n: Int, min: Int, max: Int) -> Int { if n < min { min } else if n > max {