Thank you for your analysis, it's a very strange behavior. I
still can not figure out if there is something I don't know or if
it's is simply a bug.
Good answer: Shouldn't destroy() work on an interface?
On Monday, 6 August 2012 at 20:46:45 UTC, Ali Çehreli wrote:
On 08/06/2012 06:59 AM,
09.08.2012 12:36, Roberto Delfiore пишет:
Thank you for your analysis, it's a very strange behavior. I
still can not figure out if there is something I don't know or if
it's is simply a bug.
Good answer: Shouldn't destroy() work on an interface?
Filled an issue:
See the following code:
interface A{
}
class B : A{
this(string name){this.name = name;}
~this(){
writefln(Destructor %s, name);
}
string name;
}
void main(){
B b0 = new B(b0);
B b1 = new B(b1);
A a = b0;
clear(a);
clear(b1);
}
Output:
Destructor
On 08/06/2012 06:59 AM, Roberto Delfiore wrote:
See the following code:
interface A{
}
class B : A{
this(string name){this.name = name;}
~this(){
writefln(Destructor %s, name);
}
string name;
}
void main(){
B b0 = new B(b0);
B b1 = new B(b1);
A a = b0;
clear(a);
clear(b1);
}