From 52dfc13f8f5205e56e98e6bc3687e3278c484699 Mon Sep 17 00:00:00 2001 From: rvcas Date: Thu, 12 Oct 2023 17:24:11 -0400 Subject: [PATCH] chore: explain a weird if condition --- crates/aiken-lang/src/tipo/expr.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/aiken-lang/src/tipo/expr.rs b/crates/aiken-lang/src/tipo/expr.rs index f765a398..e971480b 100644 --- a/crates/aiken-lang/src/tipo/expr.rs +++ b/crates/aiken-lang/src/tipo/expr.rs @@ -118,6 +118,9 @@ impl<'a, 'b> ExprTyper<'a, 'b> { let value = self.infer_call_argument(value, tipo.clone()); + // This is so that we can annotate the error properly + // with the pipe type mismatch situation when this is called from + // `infer_pipeline` let value = if index == 0 { value.map_err(map_err)? } else {