Cannot use auto return while using class invariants

simendsjo simendsjo at gmail.com
Fri Oct 21 16:51:18 PDT 2011


Is this a temporary restriction?

class C {
     invariant() { }
     auto f() {
         return 1;
     }
}

Error: function C.f post conditions are not supported if the return type 
is inferred


More information about the Digitalmars-d-learn mailing list