Skip to content

Commit 613e926

Browse files
committed
fix: work around bootstrap issue
1 parent ce5b414 commit 613e926

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Lean/Elab/Structure.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,10 @@ def structFields := leading_parser many (structExplicitBinder <|> struct
353353
def structCtor := leading_parser try (declModifiers >> ident >> " :: ")
354354
-/
355355
def structureSyntaxToView (modifiers : Modifiers) (stx : Syntax) : TermElabM StructView := do
356+
let stx := -- for bootstrap compatibility, remove this after stage0 update
357+
if stx.getNumArgs == 7
358+
then stx.setArgs #[stx[0], stx[1], .node .none ``Parser.Command.optDeclSig #[stx[2], stx[3]], stx[4], stx[5], stx[6]]
359+
else stx
356360
checkValidInductiveModifier modifiers
357361
let isClass := stx[0].getKind == ``Parser.Command.classTk
358362
let modifiers := if isClass then modifiers.addAttr { name := `class } else modifiers

0 commit comments

Comments
 (0)