On Mon, Apr 19, 2010 at 22:58, Steven Schveighoffer <schveiguy@yahoo.com> wrote:

I'm not used to using interfaces in this way. What become the stored T
values when you cast the classes into IW to construct your array? I suppose
they're lost?


Not sure what you mean...

What if the class has some value in it? In your code:

class WByVal(T) if (implementsW!T)
{
  this(T val) {this._t = val;}
  private T _t;
  int foo(int x)
  {
     return _t.foo(x);
  }
}

What happens to _t when I cast a WByVal to a IW?