www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10102] New: disable incompletely implemented

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10102

           Summary:  disable incompletely implemented
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bugzilla digitalmars.com



23:23:37 PDT ---
Many things are not checked for:
--------------------------
struct NotNull(T) {
    T p;

    alias p this;

    this(T p) {
        assert(p != null, "pointer is null");
        this.p = p;
    }

     disable this();

    NotNull opAssign(T p) {
        assert(p != null, "assigning null to NotNull");
        this.p = p;
        return this;
    }
}

struct S {
    NotNull!(int *) m;
    // should fail: an explicit constructor must be required for S
}

void main() {
    int i;
    NotNull!(int*) n = &i;
    *n = 3;
    assert(i == 3);
    n = &i;
    n += 1;

    NotNull!(int*)[3] a;             // should fail
    auto b = new NotNull!(int*)[3];  // should fail
    S s = S();                       // should fail
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 16 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10102


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, pull



https://github.com/D-Programming-Language/dmd/pull/2050

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10102




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/128cdb7bdb75b94d606efbd6d0a9efca68d0b941
fix Issue 10102 -  disable incompletely implemented

https://github.com/D-Programming-Language/dmd/commit/0c912dae6b482070ae03979a4c7ad0d4b57830a6


Issue 10102 -  disable incompletely implemented

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10102


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 18 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10102




Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd

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


Issue 10102 -  disable incompletely implemented

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