Skip to content

Commit

Permalink
fix: variable must execute pending tactics and elaboration problems (
Browse files Browse the repository at this point in the history
  • Loading branch information
leodemoura authored Jun 6, 2024
1 parent ba97928 commit 0a0f1d7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lean/Elab/BuiltinCommand.lean
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions tests/lean/run/2226.lean
Original file line number Diff line number Diff line change
@@ -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 changes: 12 additions & 0 deletions tests/lean/run/3214.lean
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0a0f1d7

Please sign in to comment.