summaryrefslogtreecommitdiff
path: root/dhall/src/semantics/phase
diff options
context:
space:
mode:
authorNadrieril2019-12-27 17:23:21 +0000
committerNadrieril2020-01-17 10:06:00 +0000
commit8cbec8c75d9e52091bdfe28b60b6ee698d9c1392 (patch)
tree2d9c31ee659307b9fed3e275d5a0a6fa282c5101 /dhall/src/semantics/phase
parentbc3599b815c6f9cad2f4efd30c009cbe8f765ca1 (diff)
Store corresponding binder id in AlphaVar
Diffstat (limited to 'dhall/src/semantics/phase')
-rw-r--r--dhall/src/semantics/phase/typecheck.rs3
1 files changed, 2 insertions, 1 deletions
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),
)?