Compare commits

...

1 Commits

Author SHA1 Message Date
Leonardo de Moura
e0886b18d6 fix: variable must execute pending tactics and elaboration problems
closes #2226
closes #3214
2024-06-05 18:13:46 -07:00
3 changed files with 26 additions and 1 deletions

View File

@@ -229,7 +229,7 @@ private def replaceBinderAnnotation (binder : TSyntax ``Parser.Term.bracketedBin
@[builtin_command_elab «variable»] def elabVariable : CommandElab
| `(variable $binders*) => do
-- Try to elaborate `binders` for sanity checking
runTermElabM fun _ => Term.withAutoBoundImplicit <|
runTermElabM fun _ => Term.withSynthesize <| Term.withAutoBoundImplicit <|
Term.elabBinders binders fun _ => pure ()
for binder in binders do
let binders replaceBinderAnnotation binder

13
tests/lean/run/2226.lean Normal file
View File

@@ -0,0 +1,13 @@
/--
error: unsolved goals
A : Nat
⊢ Sort ?u.3
-/
#guard_msgs in
variable (A : Nat) (B : by skip)
def foo :=
A = B
def boo :=
B

12
tests/lean/run/3214.lean Normal file
View File

@@ -0,0 +1,12 @@
class Foo (α : Type)
/--
error: function expected at
Missing
term has type
?m.9
-/
#guard_msgs in
variable {α : Type} (s : Missing α)
#synth Foo s