March 07, 2012 [Issue 7663] New: Mutable array of chars assigned to immutable fixed size array too | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=7663 Summary: Mutable array of chars assigned to immutable fixed size array too Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2012-03-07 11:01:29 PST --- void main() { char[] a = "hello".dup; immutable char[4] s = a[0 .. 4]; } DMD 2.059head gives: test.d(3): Error: cannot implicitly convert expression (a[0u..4u]) of type char[] to const(immutable(char)[]) But I think it's easy to see the assignment is valid, even at compile-time. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 10, 2013 [Issue 7663] Mutable array of chars assigned to immutable fixed size array too | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=7663 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich@gmail.com Resolution| |WORKSFORME --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-09 21:52:57 PST --- Fixed in 2.061. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation