lean4-htt/tests/lean/1930.lean.expected.out
Leonardo de Moura 56dba5b98a fix(frontends/lean/elaborator): fixes #1930
@kha the following idiom is not safe
```
   while (is_pi(t)) {
      t = whnf(binding_body(t));
   }
```
`whnf(e)` assumes that `e` does not have dangling deBruijn variables.
We should use (the more expensive):
```
   while (is_pi(t)) {
      t = whnf(instantiate(binding_body(t), locals.push_local_from_binding(t)));
   }
```
BTW, this problem is not related to the assertion violation at #1930
I just stumbled on it when fixing the violation.
2018-02-19 08:51:26 -08:00

4 lines
156 B
Text

1930.lean:3:24: error: invalid field notation, type is not of the form (C ...) where C is a constant
prod
has type
Type ? → Type ? → Type (max ? ?)