[Issue 1732] Mixin can not be instantiated

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 16 07:24:37 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1732





------- Comment #2 from aarti at interia.pl  2007-12-16 09:24 -------
Maybe, but I still find it very strange that following works:

----
import std.stdio;

template init() {
   void func() {writefln(a);}
}

void main() {
  int a;
  mixin init;
  func();
}

I see no real (practical) difference between both examples. I would say that
they should be both invalid or both valid.


-- 



More information about the Digitalmars-d-bugs mailing list