Re: shared interfaces

2015-02-15 Thread anonymous via Digitalmars-d-learn
On Sunday, 15 February 2015 at 10:43:46 UTC, Andrey Derzhavin wrote: what is wrong in declarations, if I need to declare shared classes D and C? `shared` on a class/interface makes all members shared. And that's all it does. So this: interface IA { void fnA(); } shared class C :

Re: shared interfaces

2015-02-15 Thread Andrey Derzhavin via Digitalmars-d-learn
On Sunday, 15 February 2015 at 14:59:20 UTC, anonymous wrote: Hm? Works for me. What error do you get, or what doesn't work? Which compiler are you using, which version? The error Error: function main.C.fnA does not override any function, did you mean to override 'main.IA.fnA'? has occured

Re: shared interfaces

2015-02-15 Thread Andrey Derzhavin via Digitalmars-d-learn
On Sunday, 15 February 2015 at 14:59:20 UTC, anonymous wrote: Sorry everything is OK. It's my fault. Thanks))

Re: shared interfaces

2015-02-15 Thread Andrey Derzhavin via Digitalmars-d-learn
On Sunday, 15 February 2015 at 11:30:46 UTC, anonymous wrote: On Sunday, 15 February 2015 at 10:43:46 UTC, Andrey Derzhavin wrote: what is wrong in declarations, if I need to declare shared classes D and C? `shared` on a class/interface makes all members shared. And that's all it does. So

Re: shared interfaces

2015-02-15 Thread anonymous via Digitalmars-d-learn
On Sunday, 15 February 2015 at 12:34:50 UTC, Andrey Derzhavin wrote: On Sunday, 15 February 2015 at 11:30:46 UTC, anonymous wrote: [...] interface IA { void fnA(); } shared interface IC : IA { void fnC(); } class D : IC { override void fnC() shared {} override void fnA() {} }

shared interfaces

2015-02-15 Thread Andrey Derzhavin via Digitalmars-d-learn
interface IA { void fnA(); } interface IB { void fnB(); } shared interface IC : IA, IB { void fnC(); } shared class C : IA, IB { override void fnA() // Error: function main.C.fnA does not override any function, did you mean to override 'main.IA.fnA'? {