Skip to content

Field missing on diamond-shaped instances #6046

@jthulhu

Description

@jthulhu

Prerequisites

Please put an X between the brackets as you perform the following steps:

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 where

The 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, A

then 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-lowWe are not planning to work on this issuebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions