digitalmars.D.bugs - [Issue 8134] New: Arguments getting nonsensical values in out contract when method is final
- d-bugmail puremagic.com (32/32) May 23 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8134
http://d.puremagic.com/issues/show_bug.cgi?id=8134 Summary: Arguments getting nonsensical values in out contract when method is final Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: alex lycus.org --- Comment #0 from Alex Rønne Petersen <alex lycus.org> 2012-05-23 15:14:34 CEST --- The following code is broken: void main() { auto foo = new class { final Object doNothing(Object obj) out (result) { assert (result is obj); } body { return obj; } }; foo.doNothing(null); } The 'obj' parameter is set to some nonsensical value when doNothing() is marked final. Remove the final and it works as expected. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 23 2012