chore: add test for recursive structures (#6173)

Closes #6140. This was fixed by #6125.
This commit is contained in:
Kyle Miller 2024-11-22 10:53:59 -08:00 committed by GitHub
parent e066c17a65
commit d3cb812fb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -108,6 +108,18 @@ structure A5 extends A4 Nat Bool where
x := 0
y := true
/-!
Default value whose type depends on the recursive structure.
Reported in https://github.com/leanprover/lean4/issues/6140
-/
structure RecS where
n : Nat
recS : Option RecS := none
/-- info: { n := 0, recS := none } : RecS -/
#guard_msgs in #check ({ n := 0 } : RecS)
/-!
Incidental new feature: checking projections when the structure is Prop.
-/