Thread overview
interfaces not inherited
Sep 05, 2002
Patrick Down
Sep 05, 2002
Joe Battelle
Sep 07, 2002
Patrick Down
Sep 07, 2002
Patrick Down
Sep 08, 2002
Joe Battelle
Sep 13, 2002
Walter
September 05, 2002
So I gather from the following message that
interfaces on a class are not inherited?

err.d(28): cannot implicitly convert Fred to Foo

interface Foo
{
  void doTheThing();
}

class Bar : Foo
{
  void doTheThing()
  {
    printf("one\n");
  }
}

class Fred : Bar
{
  void doTheThing()
  {
    printf("two\n");
  }
}

int main(char[][] args)
{
  Fred f = new Fred();

  Foo fi = f;

  fi.doTheThing();

  return 0;
}
September 05, 2002
>So I gather from the following message that
>interfaces on a class are not inherited?
Interfaces are broken in a couple ways--this being one side effect.  See my earlier bug reports about this in the newsgroup.  I don't know when Walter plans a fix.





September 07, 2002
Joe Battelle <Joe_member@pathlink.com> wrote in news:al70cj$1pn9$1@digitaldaemon.com:

>>So I gather from the following message that
>>interfaces on a class are not inherited?
> Interfaces are broken in a couple ways--this being one side effect. See my earlier bug reports about this in the newsgroup.  I don't know when Walter plans a fix.

Yes, the following prints "One" which isn't right
any way you look at it.

interface Foo
{
  void doTheThing();
}


class Alpha : Foo
{
  void doTheThing()
  {
    printf("One\n");
  }
}


class Beta : Alpha, Foo
{
  void doTheThing()
  {
    printf("Two\n");
  }
}


void func(Foo theFoo)
{
  theFoo.doTheThing();
}


int main(char[][] argv)
{
  Beta b = new Beta();

  func(b);

  return 0;
}
September 07, 2002
Patrick Down <pat@codemoon.com> wrote in news:Xns9281E2CE8BD23patcodemooncom@63.105.9.61:

> Yes, the following prints "One" which isn't right
> any way you look at it.

Disregaurd my post this seems to work.  There does
seem to be something odd about the way interfaces
are working but I haven't pinned it down yet.
September 08, 2002
>Disregaurd my post this seems to work.  There does
>seem to be something odd about the way interfaces
>are working but I haven't pinned it down yet.
Again, save yourself some time--read my thread on this in the group from a couple weeks ago.


September 13, 2002
"Joe Battelle" <Joe_member@pathlink.com> wrote in message news:al70cj$1pn9$1@digitaldaemon.com...
> >So I gather from the following message that
> >interfaces on a class are not inherited?
> Interfaces are broken in a couple ways--this being one side effect.  See
my
> earlier bug reports about this in the newsgroup.  I don't know when Walter
plans
> a fix.

I haven't forgotten about it. I intend to focus on it after implementing raii. It's not a trivial problem and I want to clear the table of distractions <g>.

-Walter