Skip to content

[4.14] Overridden methods keep their inherited attributes #10781

@kit-ty-kate

Description

@kit-ty-kate

Using the 4.14 branch (3f170f3), the following code now fails (compiled fine in 4.13 and older):

class virtual virt = object
  method virtual private test : unit
end

let impl = object
  inherit virt
  method test = ()
end

let () = impl#test

with the following error message:

File "test.ml", line 10, characters 9-13:
10 | let () = impl#test
              ^^^^
Error: This expression has type virt
       It has no method test

This issue makes 0install.2.17 fail to build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions