fix: unregistered level metavariable

This commit is contained in:
Leonardo de Moura 2019-12-19 09:58:05 -08:00
parent 66a59d6379
commit bdc9ea6fc6

View file

@ -75,8 +75,7 @@ match typeType with
| Expr.mvar mvarId _ =>
condM (isReadOnlyOrSyntheticOpaqueExprMVar mvarId)
(throwEx $ Exception.typeExpected type)
(do levelMVarId ← mkFreshId;
let lvl := mkLevelMVar levelMVarId;
(do lvl ← mkFreshLevelMVar;
assignExprMVar mvarId (mkSort lvl);
pure lvl)
| _ => throwEx $ Exception.typeExpected type