lean4-htt/tests/lean/run/structPrivateFieldBug2.lean
2021-08-09 19:01:08 -07:00

18 lines
257 B
Text

structure A where
private x : Nat := 10
def g (a : Nat) : A :=
{}
theorem ex1 (a : Nat) : (g a |>.x) = 10 :=
rfl
structure B extends A where
y : Nat
x := 20
def f (a : Nat) : B :=
{ y := a }
theorem ex2 (a : Nat) : (f a |>.x) = 20 :=
rfl