digitalmars.D.bugs - [Issue 1615] New: inout is allowed in foreach of string literal
- d-bugmail puremagic.com (23/23) Oct 27 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1615
- d-bugmail puremagic.com (10/10) Nov 08 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1615
- d-bugmail puremagic.com (9/9) Sep 02 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1615
http://d.puremagic.com/issues/show_bug.cgi?id=1615 Summary: inout is allowed in foreach of string literal Product: D Version: 1.022 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: ary esperanto.org.ar The following code compiles: --- void main() { foreach(inout char x; "hola") { x = '?'; } } --- But I think an error should be pointed, because x cannot be inout since the source aggregate is a string literal, which is immutable. --
Oct 27 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1615 smjg iname.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smjg iname.com Keywords| |accepts-invalid ------- Comment #1 from smjg iname.com 2007-11-08 15:15 ------- This is closely related to issue 1322 - the difference is that this applies to D 1.x as well. --
Nov 08 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1615 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from bugzilla digitalmars.com 2008-09-03 01:40 ------- Fixed dmd 2.019 --
Sep 02 2008