undefined identifier with scope statement?

Trass3r un at known.com
Sun Jun 13 12:31:41 PDT 2010

import std.stdio;

void main()
	scope(exit) writeln(res);
	auto res = 0;

This compiles, but using failure or success in the scope guard statement  
gives "undefined identifier res".
Is this intended? If yes, why?

More information about the Digitalmars-d-learn mailing list