Bug 6806 – struct TS(size_t){} instantiates in distinct types by `1` and `1u`
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-10-12T12:42:00Z
Last change time
2015-06-09T05:11:48Z
Keywords
rejects-valid
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2011-10-12T12:42:00Z
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)));
}
---
Comment #1 by k.hara.pg — 2011-10-13T23:04:32Z
This seems to be same as bug 3467.
Comment #2 by k.hara.pg — 2011-10-14T01:49:11Z
*** This issue has been marked as a duplicate of issue 3467 ***