fix: ensure inferForallType at LCNF handles universes like the kernel and MetaM

This commit is contained in:
Leonardo de Moura 2022-09-22 16:38:16 -07:00
parent 8c84531330
commit c0ac2138f7
2 changed files with 9 additions and 2 deletions

View file

@ -263,10 +263,10 @@ mutual
let e := e.instantiateRev fvars
let some u ← getLevel? e | return anyTypeExpr
let mut u := u
for x in fvars do
for x in fvars.reverse do
let xType ← inferType x
let some v ← getLevel? xType | return anyTypeExpr
u := .imax v u
u := mkLevelIMax' v u
return .sort u.normalize
partial def inferLambdaType (e : Expr) : InferTypeM Expr :=

View file

@ -0,0 +1,7 @@
import Lean
variable {U V}
def f : (U → V) → (U → U) := sorry
#eval Lean.Compiler.compile #[``f]