[Issue 6806] New: struct TS(size_t){} instantiates in distinct types by `1` and `1u`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 12 12:42:51 PDT 2011
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 at puremagic.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis <verylonglogin.reg at gmail.com> 2011-10-12 12:42:00 PDT ---
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: -------
More information about the Digitalmars-d-bugs
mailing list