chore: fix test

This commit is contained in:
Leonardo de Moura 2020-10-05 16:47:34 -07:00
parent 54e10776d4
commit 43ce35985b
2 changed files with 3 additions and 1 deletions

View file

@ -1290,6 +1290,8 @@ fun stx expectedType? =>
refTermType ← inferType refTerm;
e ← elabTerm (stx.getArg 3) expectedType?;
eType ← inferType e;
-- TODO: try coercions. We cannot simply use `ensureHasType` at this point because it has no support for the custom error message.
-- a `catch` would also not work since `ensureHasType` may postpone the coercion resolution.
unlessM (isDefEq eType refTermType) $ throwError $ mkTypeMismatchError e eType refTermType msg;
pure e

View file

@ -78,7 +78,7 @@ def find? (xs : List Nat) (p : Nat → Bool) : Option Nat := Id.run do
let result := none
for x in xs do
if p x then
result := x
result := some x
break
return result