From 8cbec8c75d9e52091bdfe28b60b6ee698d9c1392 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 27 Dec 2019 17:23:21 +0000 Subject: Store corresponding binder id in AlphaVar --- dhall/src/semantics/phase/typecheck.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dhall/src/semantics/phase') diff --git a/dhall/src/semantics/phase/typecheck.rs b/dhall/src/semantics/phase/typecheck.rs index 926598d..7e408eb 100644 --- a/dhall/src/semantics/phase/typecheck.rs +++ b/dhall/src/semantics/phase/typecheck.rs @@ -494,10 +494,11 @@ fn type_last_layer( ValueKind::UnionType(kts) => match kts.get(&x) { // Constructor has type T -> < x: T, ... > Some(Some(t)) => { + let x = ctx.new_binder(x); RetTypeOnly( tck_pi_type( ctx, - ctx.new_binder(x), + x.clone(), t.clone(), r.under_binder(x), )? -- cgit v1.2.3