Bug 11976 – Regression 2.065.b1: cannot implicitly convert expression of type ulong to int

Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2014-01-23T05:06:00Z
Last change time
2014-01-23T08:12:32Z
Assigned to
nobody
Creator
doob

Comments

Comment #0 by doob — 2014-01-23T05:06:42Z
This compiled in DMD 2.064.2: enum socket_t: int { init = -1 } void main() { size_t nfdbits; socket_t s; int index = cast(uint)s % nfdbits; } Compiling with DMD 2.065.b1 I get this error: Error: cannot implicitly convert expression (cast(ulong)cast(uint)s % nfdbits) of type ulong to int. I'm suspecting this shouldn't have compiled at all. But I just want to make sure.
Comment #1 by k.hara.pg — 2014-01-23T08:11:07Z
This is a bugfix of issue 9107.
Comment #2 by k.hara.pg — 2014-01-23T08:12:32Z
And this is -m64 only issue.