[Prev][Next][Index][Thread]

Re: simple method dispatch question



Would:

define method maybe-works( obj :: <test2> )
    maybe-works( as( <test1>, obj ) );
    maybe-works( as( <test>, obj ) );
end method;

work? Assuming test1 and test are superclasses of test2, won't obj just get
cast down? Or is this C++ rather than Dylan? :-)

- Rob.

"Jason Trenouth" <jason@harlequin.co.uk> wrote in message
b38o0tsl43hqe8np8kpbt9v0c9iar8vtap@4ax.com">news:b38o0tsl43hqe8np8kpbt9v0c9iar8vtap@4ax.com...
> On Fri, 10 Nov 2000 11:15:01 -0500 (EST), johncwhi@my-deja.com wrote:
>
> > Is it possible to force calling a particular instance of a generic
> > function-- a super class' instance--when you have an object which
> > inherits from two different super classes?
>
> Basically no. You have to do through an explicit protocol:






Follow-Ups: References: