Thread overview | |||||
---|---|---|---|---|---|
|
October 21, 2011 Cannot use auto return while using class invariants | ||||
---|---|---|---|---|
| ||||
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 |
October 22, 2011 Re: Cannot use auto return while using class invariants | ||||
---|---|---|---|---|
| ||||
Posted in reply to simendsjo | 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 |
October 22, 2011 Re: Cannot use auto return while using class invariants | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On 22.10.2011 02:06, Jonathan M Davis wrote:
> 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
Thanks. Doesn't look like it will be fixed for a while.
|
Copyright © 1999-2021 by the D Language Foundation