www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7117] New: [regression 1.071->1.072] put contract for class member functions are broken

reply d-bugmail puremagic.com writes:
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



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: -------
Dec 16 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7117




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: -------
Jan 03 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7117


Vladimir Panteleev <thecybershadow gmail.com> changed:

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



12:41:24 PST ---

 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: -------
Jan 03 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7117






 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: -------
Jan 04 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7117




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: -------
Jan 04 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7117




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).
Nice! I didn't know that. Thanks! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 04 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
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: -------
Jan 19 2012
prev sibling parent d-bugmail puremagic.com writes:
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



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: -------
Jan 25 2012