www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - repost: inout arrays and inner functions

Pretty straightforward.  There's a stack issue where inner functions can't
access char arrays.  Doing the work inside func() itself runs correctly.

D:\code\d>type test6.d
void func( inout char[] buf )
{
void app() { buf ~= 'x'; }
app();
}

int main()
{
char[] buf;
func( buf );
printf( "%.*s\n", buf );
return 0;
}

D:\code\d>test6
Error: Access Violation

D:\code\d>
Jul 23 2004