lean4-htt/tests/elab/structInstSourcesLeftToRight.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

53 lines
682 B
Text

/-!
# Testing left to right semantics for field instantiation
Implemented in PR #2478 for issue #2451.
-/
set_option pp.structureInstances.flatten false
structure A where
x : Nat
structure B where
x : Nat
y : Nat
/-!
Uses a.x
-/
def foo (a : A) (b : B) : B := {a, b with}
/-!
Uses only b
-/
def boo (a : A) (b : B) : B := {b, a with}
structure C extends B
/-!
Uses a.x
-/
def baz (a : A) (b : B) : C := {a, b with}
/-!
Uses only b
-/
def biz (a : A) (b : B) : C := {b, a with}
/-!
Uses a.x
-/
def faz (a : A) (c : C) : C := {a, c with}
/-!
Uses only b
-/
def fiz (a : A) (c : C) : C := {c, a with}
#print foo
#print boo
#print baz
#print biz
#print faz
#print fiz