test: minimal repro for evalConst crash
This commit is contained in:
parent
61403b556d
commit
d22abd85dd
1 changed files with 10 additions and 0 deletions
|
|
@ -9,3 +9,13 @@ IO.println $ env.evalConst Nat `x;
|
|||
pure ()
|
||||
|
||||
#eval tst
|
||||
|
||||
def f (x : Nat) := x + 1
|
||||
|
||||
unsafe def tst2 : MetaIO Unit := do
|
||||
env ← MetaIO.getEnv;
|
||||
f ← liftM $ IO.ofExcept $ env.evalConst (Nat → Nat) `f;
|
||||
IO.println $ (f 10);
|
||||
pure ()
|
||||
|
||||
#eval tst2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue