[Issue 9679] New: Refused const/immutable assignment in conditional

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 9 19:47:17 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9679

           Summary: Refused const/immutable assignment in conditional
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-03-09 19:47:16 PST ---
void main() {
    if (int           x = 1) {} // OK
    if (auto          x = 1) {} // OK
    if (const int     x = 1) {} // OK
    if (immutable int x = 1) {} // OK
    if (const         x = 1) {} // error
    if (immutable     x = 1) {} // error
}


dmd 2.063alpha:

test.d(6): Error: (arguments) expected following const(x)
test.d(7): Error: (arguments) expected following immutable(x)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list