summaryrefslogtreecommitdiff
path: root/dhall/src/phase
diff options
context:
space:
mode:
authorNadrieril2019-08-16 12:33:52 +0200
committerNadrieril2019-08-16 18:02:26 +0200
commit664c925186ecd587f46577715254b74b6264e4fe (patch)
tree5332617c3f5ce681d8163993853a3f73ecdd8e1b /dhall/src/phase
parent88ebc0f9d561a2541aad84a3152511a0439db8b4 (diff)
Avoid capture when typechecking union constructor
Diffstat (limited to 'dhall/src/phase')
-rw-r--r--dhall/src/phase/typecheck.rs3
1 files changed, 1 insertions, 2 deletions
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()
))
},