Is this a bug?

Eric via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 15 11:55:27 PDT 2016


On Friday, 15 April 2016 at 18:28:58 UTC, Eric wrote:
>
> line 6 can be fixed like this: "const I!(J) i = a;"
> Now if I can just figure out how to fix line 15...

This works:

   1 alias J = const C;
   2
   3 void main(string[] args)
   4 {
   5     J a = new C();
   6     const (I!(J)) i = a;
   7 }
   8
   9 interface I(V) { }
  10
  11 class F(V) if (is(V : const(I!(V)))) { }
  12
  13 class C : const (I!(J))
  14 {
  15    F!(J) m;
  16 }
  17

-Eric


More information about the Digitalmars-d-learn mailing list