[Issue 8134] New: Arguments getting nonsensical values in out contract when method is final
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 23 06:12:54 PDT 2012
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 at puremagic.com
ReportedBy: alex at lycus.org
--- Comment #0 from Alex Rønne Petersen <alex at 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: -------
More information about the Digitalmars-d-bugs
mailing list