Bug 6190 – ref bypasses array const

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-06-21T10:55:00Z
Last change time
2011-06-22T00:31:47Z
Keywords
accepts-invalid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2011-06-21T10:55:19Z
Maybe this bug is already fixed in the dmd 2.054alpha. This runs with no errors on Windows and segfaults at runtime on Linux: void foo(ref string txt) { txt.length += 1; } void main() { const s = "hello"; foo(s); }
Comment #1 by yebblies — 2011-06-22T00:31:47Z
*** This issue has been marked as a duplicate of issue 4251 ***