fix: pp.analyze do not panic on bvar

This commit is contained in:
Daniel Selsam 2021-07-29 15:36:18 -07:00 committed by Sebastian Ullrich
parent 4b57bc26b3
commit d28419594e

View file

@ -318,7 +318,7 @@ partial def analyze (parentIsApp : Bool := false) : AnalyzeM Unit := do
| Expr.letE .. => analyzeLet
| Expr.lit .. => pure ()
| Expr.mvar .. => pure ()
| Expr.bvar .. => unreachable!
| Expr.bvar .. => pure ()
where
analyzeApp := do
let needsType := !(← read).knowsType && !(← okBottomUp? (← getExpr)).isSafe