fix: fixes #1169
This commit is contained in:
parent
1d14637680
commit
988697b431
2 changed files with 9 additions and 0 deletions
|
|
@ -193,6 +193,8 @@ where
|
|||
else
|
||||
match (← matchEq? localDecl.type) with
|
||||
| some (α, lhs, rhs) =>
|
||||
let lhs ← instantiateMVars lhs
|
||||
let rhs ← instantiateMVars rhs
|
||||
if rhs.isFVar && rhs.fvarId! == h && !mctx.exprDependsOn lhs h then
|
||||
return some (localDecl.fvarId, true)
|
||||
else if lhs.isFVar && lhs.fvarId! == h && !mctx.exprDependsOn rhs h then
|
||||
|
|
|
|||
7
tests/lean/run/1169.lean
Normal file
7
tests/lean/run/1169.lean
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
inductive Foo (n: Nat)
|
||||
| mk: n = 0 → Foo n
|
||||
|
||||
example (h: Foo x): x + 1 = 1 := by
|
||||
cases h
|
||||
subst x
|
||||
rfl
|
||||
Loading…
Add table
Reference in a new issue