Bug 4740 – core.thread.atomicOp too strict about types
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-08-27T12:10:00Z
Last change time
2011-08-12T20:35:58Z
Assigned to
sean
Creator
dsimcha
Comments
Comment #0 by dsimcha — 2010-08-27T12:10:35Z
The following code should really work:
import core.atomic;
void main() {
uint num;
atomicOp!"+="(num, 1U); // Works
atomicOp!"+="(num, 1); // Doesn't work because 1 is an int, not a uint.
}
Comment #1 by dsimcha — 2011-08-12T20:35:58Z
This was apparently fixed at some point a while back, because it works in 2.054.