http://d.puremagic.com/issues/show_bug.cgi?id=5911
Summary: Closure destroys the thrown Exception . Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: sweatygar...@yahoo.co.jp --- Comment #0 from sweatygar...@yahoo.co.jp 2011-04-29 22:56:17 PDT --- The below ends with SEGV. ---------------------------- import std.stdio; void logout( lazy const(char)[] msg ) { writeln( msg ); } void main() { string str = "hello world"; logout( (){return str;}() ); // closure 1 try throw new Exception( "exception!!" ); catch( Exception e ) { logout( e.toString ); // closure2 SEGV : e is null. } } ---------------------------- Build : dmd 2.052 on Windows Vista WOW64. Without `closure 1', the code executed successfully. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------