fix: simple match case
This commit is contained in:
parent
30b9792148
commit
d86164cf54
2 changed files with 4 additions and 1 deletions
|
|
@ -1008,7 +1008,8 @@ private def isPatternVar (stx : Syntax) : TermElabM Bool := do
|
|||
| Expr.const fName _ _ =>
|
||||
match (← getEnv).find? fName with
|
||||
| some (ConstantInfo.ctorInfo _) => return false
|
||||
| _ => isAtomicIdent stx
|
||||
| some _ => return !hasMatchPatternAttribute (← getEnv) fName
|
||||
| _ => isAtomicIdent stx
|
||||
| _ => isAtomicIdent stx
|
||||
where
|
||||
isAtomicIdent (stx : Syntax) : Bool :=
|
||||
|
|
|
|||
2
tests/lean/run/matchVarIssue.lean
Normal file
2
tests/lean/run/matchVarIssue.lean
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
theorem ex {c d : Char} : c = d → c.val = d.val
|
||||
| rfl => rfl
|
||||
Loading…
Add table
Reference in a new issue