It's actually @trusted as per the docs. I do not know why DMD infers that to be @safe.....

In any case, the solution here is this:

    override hash_t toHash() @trusted const pure nothrow {
        return cast(hash_t)(this.x + this.y);
    }

Yes, it's already trusted.

If I write "@trusted const pure nothrow" it works fine, but if i write "const pure nothrow" not. Why? I thought the compiler is orientating at the base method which is overriden.

Reply via email to