www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6806] New: struct TS(size_t){} instantiates in distinct types by `1` and `1u`

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

           Summary: struct TS(size_t){} instantiates in distinct types by
                    `1` and `1u`
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



---
The main bug is:
---
struct TS(size_t n) { }
static assert(is(TS!(1u) == TS!(1)));
---
main.d(2): Error: static assert  (is(TS!(1u) == TS!(1))) is false

The second is a minor naming 2 only bug:
---
struct TS(size_t k) { }

TS!(n) get(size_t n)() { return TS!(n)(); }

void main()
{
    //get!(1)(); //uncomment to enable D2 only type naming bug

    // The next line produces `assert(is(TS!(   ) == TS!(1))) is false` error
    // where     is replaced by `1u` if `get` call is commented, and by `n`
otherwise.
    static assert(is(TS!(1u) == TS!(1))); 
}
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 12 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6806


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid



This seems to be same as bug 3467.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 13 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6806


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

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



*** This issue has been marked as a duplicate of issue 3467 ***

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