lean4-htt/tests/lean/run/fieldIssue.lean
Leonardo de Moura b2bc2d2775 feat: improve field notation argument search
@Kha the new test may look exoteric, but it reflects an actual
instance in our code base, and the old frontend supports it.
Not sure whether we should keep it or not.
2020-10-16 14:32:03 -07:00

21 lines
318 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#lang lean4
structure SCore (α : Type) :=
(x : α) (y : Nat)
inductive M
| leaf : Nat → M
| node : SCore M → M
abbrev S := SCore M
/- We use `s : S` for convenience here -/
def SCore.doubleY (s : S) : Nat :=
2 * s.y
def f (s : S) : Nat :=
s.doubleY
def g : M → Nat
| M.leaf n => n
| M.node s => s.doubleY