summaryrefslogtreecommitdiff
path: root/dhall/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall/src/operations/typecheck.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/dhall/src/operations/typecheck.rs b/dhall/src/operations/typecheck.rs
index 3016fea..bc0e864 100644
--- a/dhall/src/operations/typecheck.rs
+++ b/dhall/src/operations/typecheck.rs
@@ -350,8 +350,8 @@ pub fn typecheck_operation(
if *x.ty().kind() != NirKind::from_builtin(Builtin::Bool) {
return span_err("InvalidPredicate");
}
- if y.ty().ty().as_const() != Some(Const::Type) {
- return span_err("IfBranchMustBeTerm");
+ if y.ty().ty().as_const().is_none() {
+ return span_err("IfBranchMustBeTermTypeOrKind");
}
if y.ty() != z.ty() {
return span_err("IfBranchMismatch");