Skip to content

Commit

Permalink
additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
kmill committed Jul 24, 2024
1 parent 37b87c6 commit af63264
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lean/Elab/App.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ private partial def resolveDotName (id : Syntax) (expectedType? : Option Expr) :
withForallBody expectedType fun resultType => do
go resultType expectedType #[]
where
/-- A weak version of forallTelescopeReducing that only uses whnfCore. -/
/-- A weak version of forallTelescopeReducing that only uses whnfCore, to avoid unfolding definitions except by `unfoldDefinition?` below. -/
withForallBody {α} (type : Expr) (k : Expr → TermElabM α) : TermElabM α :=
forallTelescope type fun _ body => do
let body ← whnfCore body
Expand Down
9 changes: 9 additions & 0 deletions tests/lean/run/4761.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ def Foo : Prop := ∀ a : Nat, a = a

protected theorem Foo.intro : Foo := sorry
example : Foo := .intro

/-!
Making sure that the type synonym `Foo'` still works.
This used to be unfolded during `forallTelescopeReducing`,
and now it is "manually" unfolded in the elaboration algorithm.
-/
example : Nat → Option Nat := .some
def Foo' := Nat → Option Nat
example : Foo' := .some

0 comments on commit af63264

Please sign in to comment.