[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 13:34:18 PDT 2009


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





--- Comment #15 from Sergey Gromov <snake.scaly at gmail.com>  2009-08-14 13:34:17 PDT ---
I do think it's valid, see my comment #9.  According to the obj2asm, when you
pass a local var as an alias parameter to a template:

void foo() {
  int i;
  bar!(i)();
}
void bar(alias var)() {
  var = 1;
}

compiler rewrites it as

void foo() {
  int i;
  void bar() {
    i = 1;
  }
  bar();
}

Probably this rewrite is not always possible, hence the assertion failure.

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