www.digitalmars.com         C & C++   DMDScript  

D - [bug] interfaces and objects

reply "Pavel Minayev" <evilone omen.ru> writes:
It seems that D doesn't like it when objects are
passed to interface methods. For example, this hangs
the compiler:

    interface IPersistent
    {
     void store(Object);
     void retrieve(Object);
    }

    class Persistent: IPersistent
    {
     void store(Object n) { }
     void retrieve(Object n) { }
    }

But change the arguments from Object to int, and
everything works fine!
Jan 10 2002
parent "Walter" <walter digitalmars.com> writes:
This is fixed now, will go out in the next update. -Walter

"Pavel Minayev" <evilone omen.ru> wrote in message
news:a1koso$kvn$1 digitaldaemon.com...
 It seems that D doesn't like it when objects are
 passed to interface methods. For example, this hangs
 the compiler:

     interface IPersistent
     {
      void store(Object);
      void retrieve(Object);
     }

     class Persistent: IPersistent
     {
      void store(Object n) { }
      void retrieve(Object n) { }
     }

 But change the arguments from Object to int, and
 everything works fine!

Jan 10 2002