is it bug?
BBaz via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jan 30 05:39:04 PST 2015
On Friday, 30 January 2015 at 13:34:57 UTC, drug wrote:
> On 30.01.2015 16:31, BBaz wrote:
>> On Friday, 30 January 2015 at 12:32:05 UTC, drug wrote:
>>
>>> static init()
>>> {
>>> auto instance = new typeof(this)();
>>> instance._cont = new Container();
>>> return instance;
>>> }
>>
>> have you tried
>>
>> ---
>> static typeof(this) init()
>> {
>> auto instance = new typeof(this)();
>> instance._cont = new Container();
>> return instance;
>> }
>> ---
>>
>> ?
>>
>> because currently either "void" or a type is missing.
>>
> Type is inferred automatically.
right, i've forgot that init() is a >>built-in<< property.
But it seemsthat i'm not the only one...
More information about the Digitalmars-d-learn
mailing list