bug in purity validation

Timon Gehr timon.gehr at gmx.ch
Sun Jun 5 03:06:30 PDT 2011


>From bearophile's ported benchmark:

    // Getters/Setters
    pure nothrow SimpleLoop* parent() { return parent_; }
    //...
    pure nothrow void setParent(SimpleLoop* parent) {
        parent_ = parent;
        parent.addChildLoop(&this);
    }
    //...
    SimpleLoop* parent_;

Why does that compile? There is no way those functions can be pure.

Timon


More information about the Digitalmars-d mailing list