Bug 1344 – (D1 only) Can't implicitly convert literal 0 to typedef of ulong
Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-07-17T17:37:16Z
Last change time
2019-05-11T17:11:27Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Russ Lewis
Comments
Comment #0 by webmaster — 2007-07-17T17:37:16Z
The following will not compile:
typedef uint u32;
typedef ulong u64;
void main() {
uint a = 0;
ulong b = 0;
u32 c = 0;
u64 d = 0;
}
It fails with the following error:
foo.d(7): Error: cannot implicitly convert expression (0) of type int to u64
Notice that it works just find with typedefs of uint.