You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Lean
elab "#assertType " termStx:term " : " typeStx:term : command =>
open Lean Lean.Elab Command Term in
liftTermElabM
try
let tp ← elabType typeStx
discard $ elabTermEnsuringType termStx tp
synthesizeSyntheticMVarsNoPostponing
logInfo "success"
catch | _ => throwError "failure"/-- info: success -/
#assertType 5 : Nat
-- don't display names of metavariablesset_option pp.mvars false in/--error: type mismatch []has type List ?_ : Type _but is expected to have type Nat : Type-/
#assertType [] : Nat
And could reproduce the following problems either in the online editor, or locally on emacs:
At the end of the -/ closing block comment, I get error message "unexpected token '#assertType'..."
If I delete the block comments, the first example #assertType 5 : Nat works as expected. But in the second example, even though I see an error below [] as expected, the entire command is still underlined blue, saying "success" when I hover over it.
I guess Lean has recently changed behaviors that made the examples outdated?
Thanks!
The text was updated successfully, but these errors were encountered:
I tried the example as below:
And could reproduce the following problems either in the online editor, or locally on emacs:
-/
closing block comment, I get error message "unexpected token '#assertType'..."#assertType 5 : Nat
works as expected. But in the second example, even though I see an error below[]
as expected, the entire command is still underlined blue, saying "success" when I hover over it.I guess Lean has recently changed behaviors that made the examples outdated?
Thanks!
The text was updated successfully, but these errors were encountered: