From 664c925186ecd587f46577715254b74b6264e4fe Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 16 Aug 2019 12:33:52 +0200 Subject: Avoid capture when typechecking union constructor --- dhall/src/phase/typecheck.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'dhall/src') diff --git a/dhall/src/phase/typecheck.rs b/dhall/src/phase/typecheck.rs index 56fb5ed..2030f21 100644 --- a/dhall/src/phase/typecheck.rs +++ b/dhall/src/phase/typecheck.rs @@ -564,13 +564,12 @@ fn type_last_layer( Value::UnionType(kts) => match kts.get(&x) { // Constructor has type T -> < x: T, ... > Some(Some(t)) => { - // TODO: avoid capture Ok(RetTypeOnly( tck_pi_type( ctx, "_".into(), t.to_type(), - r.clone(), + r.under_binder(Label::from("_")), )?.to_type() )) }, -- cgit v1.2.3