fix: bug at inferProjType for LCNF

This commit is contained in:
Leonardo de Moura 2022-09-05 19:23:35 -07:00
parent 3e210d9f26
commit bf44e9fb2f
2 changed files with 9 additions and 2 deletions

View file

@ -102,8 +102,11 @@ mutual
for _ in [:idx] do
match ctorType with
| .forallE _ _ body _ =>
assert! !body.hasLooseBVars
ctorType := body
if body.hasLooseBVars then
-- This can happen when one of the fields is a type or type former.
ctorType := body.instantiate1 anyTypeExpr
else
ctorType := body
| _ =>
if ctorType.isAnyType then return anyTypeExpr
failed ()

View file

@ -0,0 +1,4 @@
import Lean
set_option trace.Compiler.result true
#eval Lean.Compiler.compile #[``Lean.Meta.mapMetaM]