[Issue 7117] New: [regression 1.071->1.072] put contract for class member functions are broken
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 16 09:18:08 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7117
Summary: [regression 1.071->1.072] put contract for class
member functions are broken
Product: D
Version: D1
Platform: All
OS/Version: Linux
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: llucax at gmail.com
--- Comment #0 from Leandro Lucarella <llucax at gmail.com> 2011-12-16 09:18:04 PST ---
When upgrading from 1.071 to 1.072 I had problems with out contracts for class
member functions. Here is a minimal testcase:
---
module bug;
extern (C) int printf(char*, ...);
class Sad
{
// only happens with class member functions, struct member functions work
// well and static class member function works well also
void func ( int n )
out
{
printf("out: %d\n", n);
assert ( n == 23, "DMD IS SO BROKEN");
}
body
{
printf("body: %d\n", n);
assert ( n == 23, "Expected to work");
return ;
}
}
void main(char[][] args)
{
auto c = new Sad;
c.func(23);
}
---
I tried to do a git bisect to come up with the exact commit that broke this but
it was impossible because there are commits that doesn't compile. It would be
nice if you could only commit changes that compiles to allow bisecting the code
to find exactly where regressions were introduced.
(this was tested in both 32 and 64 bit version in Linux)
--
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