fix: out-of-bounds array access
This commit is contained in:
parent
b3c8ee2923
commit
d379cd6853
1 changed files with 1 additions and 2 deletions
|
|
@ -342,8 +342,7 @@ def checkRuleKind (given expected : SyntaxNodeKind) : Bool :=
|
|||
given == expected || given == expected ++ `antiquot
|
||||
|
||||
def inferMacroRulesAltKind : Syntax → CommandElabM SyntaxNodeKind
|
||||
| `(matchAltExpr| | $pats,* => $rhs) => do
|
||||
let pat := pats.elemsAndSeps[0]
|
||||
| `(matchAltExpr| | $pat:term => $rhs) => do
|
||||
if !pat.isQuot then
|
||||
throwUnsupportedSyntax
|
||||
let quoted := getQuotContent pat
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue