Skip to content

Commit

Permalink
remove bootstrapping hack
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Dec 1, 2023
1 parent e9295ae commit 31ab0bc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Lean/Elab/Structure.lean
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,8 @@ where
if h : i < view.parents.size then
let parentStx := view.parents.get ⟨i, h⟩
withRef parentStx do
let mut (isFlat, parentStx) :=
if parentStx.isOfKind ``Parser.Command.extendsItem then
(!parentStx[0].isNone, parentStx[1])
else
-- hack for stage0 syntax from `class abbrev`
(false, parentStx)
let parentType ← Term.elabType parentStx
let mut isFlat := !parentStx[0].isNone
let parentType ← Term.elabType parentStx[1]
let parentStructName ← getStructureName parentType
-- If `flat` was not specified but the fields overlap, behave as though it were specified.
if not isFlat then
Expand Down

0 comments on commit 31ab0bc

Please sign in to comment.