Thread overview |
---|
October 27, 2007 [Issue 1615] New: inout is allowed in foreach of string literal | ||||
---|---|---|---|---|
| ||||
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. -- |
November 08, 2007 [Issue 1615] inout is allowed in foreach of string literal | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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. -- |
September 03, 2008 [Issue 1615] inout is allowed in foreach of string literal | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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 -- |
Copyright © 1999-2021 by the D Language Foundation