diff options
author | Nadrieril | 2019-08-16 12:33:52 +0200 |
---|---|---|
committer | Nadrieril | 2019-08-16 18:02:26 +0200 |
commit | 664c925186ecd587f46577715254b74b6264e4fe (patch) | |
tree | 5332617c3f5ce681d8163993853a3f73ecdd8e1b | |
parent | 88ebc0f9d561a2541aad84a3152511a0439db8b4 (diff) |
Avoid capture when typechecking union constructor
-rw-r--r-- | dhall/src/phase/typecheck.rs | 3 |
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() )) }, |