lean4-htt/tests/lean/1878.lean
Leonardo de Moura 543a7e26d4 test: for #1878
closes #1878
2022-11-24 13:03:45 -08:00

19 lines
404 B
Text

import Lean
inductive Foo where
| a | b | c
namespace Foo
scoped instance (priority := 10) inst1 : Inhabited Foo :=
⟨.a⟩
instance inst2 : Inhabited Foo :=
⟨.b⟩
open Lean Meta
def test (declName : Name) : CoreM Unit := do
IO.println s!"{declName}, priority: {← getInstancePriority? declName}, kind: {← getInstanceAttrKind? declName}"
#eval test `Foo.inst1
#eval test `Foo.inst2