Note that test for issue #1200 broke. The bug fixed by this commit was allowing the example to be elaborated correctly :( Initially, the type of the discriminant is not available, and `.none (α:=α)` can only be elaborated when the expected type is of the form `C ...`. Lean then tries to elaborate the alternatives, learn that the discriminant should be `Option ?m`, and fails because the patterns still have metavariables after elaboration. Before the bug fix, `resumePostpone` was **not** restoring the metavariable context, and the assingnment would stay there. With this information, Lean can now elaborate `.none (α:=α)`. Although the bug had a positive impact in this case, it produced incorrect behavior in other examples. The fixed example looks reasonable. Thus, we will not reopen issue #1200
6 lines
111 B
Text
6 lines
111 B
Text
example
|
||
(h: match none (α:=α) with
|
||
| some _ => True
|
||
| _ => True):
|
||
True := by
|
||
split at h <;> trivial
|