[Issue 2962] ICE(glue.c) or bad codegen passing variable as template value parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 14 08:03:45 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2962
--- Comment #9 from Sergey Gromov <snake.scaly at 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: -------
More information about the Digitalmars-d-bugs
mailing list