Bug 5273 – ref Primitives Can Be Implicitly Cast To immutable

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-11-24T12:20:00Z
Last change time
2011-01-26T18:27:06Z
Keywords
accepts-invalid
Assigned to
nobody
Creator
dsimcha

Comments

Comment #0 by dsimcha — 2010-11-24T12:20:35Z
The following invalid code is accepted: bool isSmall(immutable ref int num) { return num < 5; } void main() { int num; isSmall(num); }
Comment #1 by yebblies — 2011-01-26T18:27:06Z
*** This issue has been marked as a duplicate of issue 5493 ***