Open SBuercklin opened 1 week ago
Yes, this is a limitation of having to create actual methods to make the fallback work :( It wouldn't be a problem if the typesystem itself were aware of the interface, because then the error would come from having a distinction between an interface & a defined method to throw the NotImplementedError
from. It would be the compiler/type checker that throws the error, not a fallback method.
I think it could be made to work in this particular case, at least in terms of having check_implementations
report a "success", but you'd still get an ambiguity when actually trying to call this method.
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