lean4-htt/tests/lean/run/461b.lean
jrr6 119854e248
feat: add hints for missing structure instance fields (#9317)
This PR adds to the "fields missing" error message for structure
instance notation a code-action hint that inserts all missing fields.
2025-07-17 03:22:34 +00:00

19 lines
347 B
Text

structure FooS where
x : Nat
y : Nat
h : x = y
structure BarS extends FooS where
h' : x = y
h := h'
def f (x : Nat) : BarS :=
{ x, y := x, h' := rfl }
/-- error: Cannot synthesize placeholder for field `h` -/
#guard_msgs in
example (x : Nat) : BarS :=
{ x, h' := rfl, .. }
def f1 (x : Nat) : BarS :=
{ x, h' := rfl, y := _ }