D - foreach and -inline problems
My code compiled fine until I used the -inline switch and I got this: foo.d(581): function bar cannot access frame of function __anonymous I realized it was trying to inline a function that contained a foreach statement. I commented the foreach statements and it compiled ok. I noticed this error awhile ago with constructors but I think it was fixed already. I also noticed something odd happening with nested foreach statements, I tried to return in the inner one and it complained about the return type: cannot implicitly convert ListItem to int. The inner one was something like this: foreach(ListItem li; list) { } and the function's return type was ListItem. There were no ints involved so it must be from the apply function.
Oct 07 2003
If you could reproduce each of these with a small test case, that would be most helpful. Thanks, -Walter "Vathix" <vathix dprogramming.com> wrote in message news:blvf4a$1lft$1 digitaldaemon.com...My code compiled fine until I used the -inline switch and I got this: foo.d(581): function bar cannot access frame of function __anonymous I realized it was trying to inline a function that contained a foreach statement. I commented the foreach statements and it compiled ok. Inoticedthis error awhile ago with constructors but I think it was fixed already. I also noticed something odd happening with nested foreach statements, I tried to return in the inner one and it complained about the return type: cannot implicitly convert ListItem to int. The inner one was somethinglikethis: foreach(ListItem li; list) { } and the function's return type was ListItem. There were no ints involvedsoit must be from the apply function.
Oct 08 2003