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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 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: -------