Summary: struct invariants documentation
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2

--- Comment #0 from 2010-06-15 18:13:44 PDT ---
I'd like D docs to state that invariants can be used inside structs too (so
putting the explanation of invariants in this page is bad: ).

The documentation about struct invariants also needs to exaplain that the
assert() syntax can't be used to call struct invariants (as it is possible with
class references):

struct Foo {
    int x;
    invariant() { assert(x == 1); }
void main() {
    Foo f;
    assert(f); //  Error: expression f of type Foo does not have a boolean

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

Reply via email to