Thread overview
[Issue 7117] New: [regression 1.071->1.072] put contract for class member functions are broken
Dec 16, 2011
Leandro Lucarella
[Issue 7117] Regression(2.057, 1.072): out contract for class member functions are broken
Jan 03, 2012
Don
Jan 03, 2012
Vladimir Panteleev
Jan 04, 2012
Don
Jan 04, 2012
Vladimir Panteleev
Jan 04, 2012
Leandro Lucarella
Jan 20, 2012
Jesse Phillips
Jan 25, 2012
Walter Bright
December 16, 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@puremagic.com
        ReportedBy: llucax@gmail.com


--- Comment #0 from Leandro Lucarella <llucax@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: -------
January 03, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7117



--- Comment #1 from Don <clugdbug@yahoo.com.au> 2012-01-03 12:13:32 PST ---
Regression was introduced in this commit, fixing bug 6859:

https://github.com/D-Programming-Language/dmd/commit/17d9baeb9f9c000b1b6828baa0bb7c73cb38e31b

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 03, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7117


Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com


--- Comment #2 from Vladimir Panteleev <thecybershadow@gmail.com> 2012-01-03 12:41:24 PST ---
(In reply to comment #0)
> 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.

"git bisect skip" should help in such situations.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 04, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7117



--- Comment #3 from Don <clugdbug@yahoo.com.au> 2012-01-04 05:54:59 PST ---
(In reply to comment #2)
> (In reply to comment #0)
> > 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.
> 
> "git bisect skip" should help in such situations.

Not in this case. Almost every commit was broken.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 04, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7117



--- Comment #5 from Vladimir Panteleev <thecybershadow@gmail.com> 2012-01-04 14:03:39 PST ---
From git bisect's man page:

> The special exit code 125 should be used when the current source code cannot be tested. If the script exits with this code, the current revision will be skipped (see git bisect skip above).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 04, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7117



--- Comment #6 from Leandro Lucarella <llucax@gmail.com> 2012-01-04 14:38:08 PST ---
(In reply to comment #5)
> From git bisect's man page:
> 
> > The special exit code 125 should be used when the current source code cannot be tested. If the script exits with this code, the current revision will be skipped (see git bisect skip above).

Nice! I didn't know that. Thanks!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 20, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7117


Jesse Phillips <Jesse.K.Phillips+D@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Jesse.K.Phillips+D@gmail.co
                   |                            |m
   Target Milestone|---                         |2.059


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 25, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7117


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |DUPLICATE


--- Comment #7 from Walter Bright <bugzilla@digitalmars.com> 2012-01-25 12:38:42 PST ---
*** This issue has been marked as a duplicate of issue 7335 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------