-
Notifications
You must be signed in to change notification settings - Fork 810
Field missing on diamond-shaped instances #6046
Copy link
Copy link
Closed
Labels
P-lowWe are not planning to work on this issueWe are not planning to work on this issuebugSomething isn't workingSomething isn't working
Description
Prerequisites
Please put an X between the brackets as you perform the following steps:
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
In the following example
class A
class B extends A where
b : Unit
class C extends A, B
instance : A where
instance : B where
b := ()
instance : C whereThe last line produces an error fields missing: 'b'. If, instead, I change the order of the inherited classes of C, as such
class C extends B, Athen it works.
Versions
Tried both on my computer (Lean 4.12.0 on NixOS/nixpkgs unstable) and on live.lean-lang.org.
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P-lowWe are not planning to work on this issueWe are not planning to work on this issuebugSomething isn't workingSomething isn't working