www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Full closures not working with lazy parameters

Compiled using DMD 2.007 on Windows.

int delegate() foo(lazy int arg){
	return {return arg;};
}

void main(){
	auto ptr = foo(35);
	writefln(ptr());
}


This code gives an access violation error.
Nov 03 2007