fix: simple match case

This commit is contained in:
Leonardo de Moura 2021-03-24 11:46:55 -07:00
parent 30b9792148
commit d86164cf54
2 changed files with 4 additions and 1 deletions

View file

@ -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 :=

View file

@ -0,0 +1,2 @@
theorem ex {c d : Char} : c = d → c.val = d.val
| rfl => rfl