Skip to content

Commit

Permalink
Fix segfault triggered by codegen bug (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLimperg authored Dec 5, 2024
1 parent 8b6048a commit 1c1c651
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Aesop/Frontend/RuleExpr.lean
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ inductive Feature

namespace Feature

-- Workaround for codegen bug, see #182
set_option compiler.extract_closed false in
partial def «elab» (stx : Syntax) : ElabM Feature :=
withRef stx do
match stx with
Expand All @@ -330,7 +332,7 @@ partial def «elab» (stx : Syntax) : ElabM Feature :=
let nonIdentAlts :=
stx.getArgs.filter λ stx => ! stx.isOfKind ``Parser.featIdent
if h : nonIdentAlts.size = 1 then
return ← «elab» $ nonIdentAlts[0]'(by simp [h])
return ← «elab» $ nonIdentAlts[0]
throwUnsupportedSyntax

end Feature
Expand Down

0 comments on commit 1c1c651

Please sign in to comment.