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





--- Comment #9 from Sergey Gromov <snake.sc...@gmail.com>  2009-08-14 08:03:44 
PDT ---
By the way, the example Lars posted is not as obviously invalid, at least to
me.  He passes a local variable as a template alias parameter.  Docs say that
"local names" can be used as template alias parameters.  This actually works
correctly:

import std.stdio;
void main() {
  foo(1);
}
void foo(int a) {
  bar!(a)();
  writefln(a);
}
void bar(alias var)() {
  var = 2;
}

Prints 2.  This works even if bar is defined in a different module.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to