D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4560 - D2 Language Docs: http://www.digitalmars.com/d/2.0/const3.html
Summary: D2 Language Docs: http://www.digitalmars.com/d/2.0/const3.html
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: Other All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-01 14:27 UTC by Andrej Mitrovic
Modified: 2012-01-04 10:15 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2010-08-01 14:27:03 UTC
The menu on the left with the list of language documentation pages is missing from this page (the one with the links to "Lexical Modules Declarations Types..." etc).



"Immutable Member Functions"

The example code has a missing closing brace and will give out the wrong errors (it will complain about initializing x outside of a constructor instead of complaining about immutability). Change the code to this to get the relevant errors:

struct S
{   
    int x = 1;

    immutable void foo()
    {
        x = 4;	    // error, x is immutable
        this.x = 4; // error, x is immutable
    }
}
Comment 1 Andrej Mitrovic 2012-01-04 10:15:32 UTC
Fixed ages ago.