[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


--- 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

import std.stdio;
void main() {
void foo(int 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