Mercurial > projects > dstress
view run/opIdentity_02.d @ 570:32f7f8ce5e51
updated "===" -> "is" and "!==" to "!(...===...)"
author | thomask |
---|---|
date | Wed, 08 Jun 2005 17:49:15 +0000 |
parents | d1da3b19ce2b |
children | 52c9e86b6486 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ teqDruid <me@teqdruid.com> // @date@ 2005-01-12 // @uri@ news:pan.2005.01.12.13.20.54.546749@teqdruid.com // @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/2676 module dstress.run.opIdentity_02; interface I { I parent(); void parent(I i); void addChild(I i); } interface J : I { } class A : I { private I myParent; void addChild(I i) { i.parent = this; } I parent() { return myParent; } void parent(I parent) { myParent = parent; } } class B : A, J { } int main() { J a = new B; J b = new B; a.addChild(b); assert(cast(J)b.parent is a); return 0; }