Summary: 'inout' is accepted in foreach, but apparently ignored
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Don <> 2011-09-21 04:10:10 PDT ---
This is fail253.d from the test suite. It prints "holahola".
Changing inout into ref restores the original check in the test suite -- but I
don't think this should compile.

import std.stdio;

void main() {
    foreach (i; 0 .. 2)
        foreach(inout char x; "hola") {
        printf("%c", x);
        x = '?';

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to