1st thing--
// module 1
funcdef void Func();
shared interface ielement
{
Func@ f { get; set; }
}
// module 2
funcdef void Func();
shared interface ielement
{
Func@ f { get; set; }
}
class celement : ielement
{
Func@ fdef;
Func@ get_f()
{
return( this.fdef );
}
void set_f( Func@ newF )
{
@this.fdef = newF;
}
}
Used that way, makes "Missing implementation of ..." error for both, getter and setter. So i tried to use "normal" functions.
// module 1
funcdef void Func();
shared interface ielement
{
Func@ fGet();
void fSet( Func@ );
}
// module 2
funcdef void Func();
shared interface ielement
{
Func@ fGet();
void fSet( Func@ );
}
class celement : ielement
{
Func@ fdef;
Func@ fGet()
{
return( this.fdef );
}
void fSet( Func@ newF )
{
@this.fdef = newF;
}
}
Error changed to " Shared type 'ielement' doesn't match the original declaration in other module"
----
2nd thing--
shared interface ielement
{
void dummy1();
}
shared interface isprite : ielement
{
void dummy2();
}
class celement : ielement
{
void dummy1() {}
}
class csprite : celement, isprite
{
csprite()
{
super();
}
void dummy2() {}
}
Makes warning "The interface 'ielement' is already implemented" - is that possible to make this warning go away?
EDIT: everything was tested with r1563