"extending" existed class

Bill Baxter wbaxter at gmail.com
Wed Oct 18 06:15:58 PDT 2006


Lionello Lunesu wrote:
> novice2 wrote:
>>
>> Compiler say
>> 1.d(20): no property 'method2' for type '1.A'
>>
>> Can anyone say, what i missed, or the better way to "extend"
>> existed class without declare new class based on existed?
>> Thanks.
> 
> 
> It is, and was, only possible for arrays. But I sure wish it was 
> possible for all types (classes, but int/float/etc too!)

By the way, where is that fun feature for arrays documented?  I can't 
seem to find it anywhere in the D spec at http://www.digitalmars.com/d/.

--bb



More information about the Digitalmars-d-learn mailing list