shared interfaces

Andrey Derzhavin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Feb 15 02:43:42 PST 2015


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'?
	{

	}

	override void fnB() // Error: function main.C.fnB does not 
override any function, did you mean to override 'main.IA.fnA'?
	{

	}


shared class D : IC
{
	
	override void fnC()
	{
	}
	
	override void fnA() // Error: function main.D.fnA does not 
override any function, did you mean to override 'main.IA.fnA'?
	{
		
	}
	
	override void fnB() // Error: function main.D.fnB does not 
override any function, did you mean to override 'main.IB.fnB'?
	{
		
	}
}

what is wrong in declarations, if I need to declare shared 
classes D and C?


More information about the Digitalmars-d-learn mailing list