fix: bug at inferProjType for LCNF
This commit is contained in:
parent
3e210d9f26
commit
bf44e9fb2f
2 changed files with 9 additions and 2 deletions
|
|
@ -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 ()
|
||||
|
|
|
|||
4
tests/lean/run/lcnfInferProjTypeBug.lean
Normal file
4
tests/lean/run/lcnfInferProjTypeBug.lean
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import Lean
|
||||
|
||||
set_option trace.Compiler.result true
|
||||
#eval Lean.Compiler.compile #[``Lean.Meta.mapMetaM]
|
||||
Loading…
Add table
Reference in a new issue