fix: the code is reachable

This commit is contained in:
Leonardo de Moura 2021-04-02 07:29:56 -07:00
parent 30062b8988
commit a22d8dd924

View file

@ -138,14 +138,14 @@ def expandMacrosInPatterns (matchAlts : Array MatchAltView) : MacroM (Array Matc
/- Given `stx` a match-expression, return its alternatives. -/
private def getMatchAlts : Syntax → Array MatchAltView
| `(match $discrs,* $[: $ty?]? with $alts:matchAlt*) =>
alts.map fun alt => match alt with
| `(matchAltExpr| | $patterns,* => $rhs) => {
alts.filterMap fun alt => match alt with
| `(matchAltExpr| | $patterns,* => $rhs) => some {
ref := alt,
patterns := patterns,
rhs := rhs
}
| _ => unreachable!
| _ => unreachable!
| _ => none
| _ => #[]
/--
Auxiliary annotation used to mark terms marked with the "inaccessible" annotation `.(t)` and