lean4-htt/tests/lean/run/elimOptParam.lean
Leonardo de Moura 37450d47e2
fix: bug at elimOptParam (#3595)
`let_expr` uses `cleanupAnnotations` which consumes `optParam` type
annotations.

cc @nomeata
2024-03-04 23:56:00 +00:00

14 lines
202 B
Text

import Lean
def f (x := 0) (y := 1) : Nat :=
x + y
open Lean Meta
/--
info: Nat → Nat → Nat
-/
#guard_msgs in
run_meta do
let info ← getConstInfo ``f
logInfo (← elimOptParam info.type)