www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.signals and the object delegate limitation

The current std.signals assumes that all slots are delegates to Objects.
Is that still required with the new typeinfo stuff in the GC?

I see there's a setTypeInfo in std.gc, but no getTypeInfo.  If it did 
exist I would guess you could just do

         TypeInfo ti = gc.getTypeInfo(slot.ptr);
         if (derivesFrom(typeid(Object), ti)) {
                 Object o = _d_toObject(slot.ptr);

It would be nice if the class-only restriction could be lifted.

Apr 24 2007