Skip to content

Interfaces failing when matching on supertype #18

Description

@SBuercklin

The following fails because I define bar(::Foo, ::Any), which gives an ambiguity error when I try e.g. bar(::Foo, ::Int) with the default error fallback using the abstract type

using RequiredInterfaces

abstract type MyInterface end
@required MyInterface begin
    bar(::MyInterface, ::Number)
end

struct Foo <: MyInterface end
bar(::Foo, x) = x

RequiredInterfaces.check_implementations(MyInterface)
# Fails because of ambiguity with the erroring fallback

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions