Cannot use auto return while using class invariants

Jonathan M Davis jmdavisProg at gmx.com
Fri Oct 21 17:06:12 PDT 2011


On Friday, October 21, 2011 16:51 simendsjo wrote:
> 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

http://d.puremagic.com/issues/show_bug.cgi?id=5039


More information about the Digitalmars-d-learn mailing list