Mercurial > projects > dstress
view run/opIdentity_01.d @ 570:32f7f8ce5e51
updated "===" -> "is" and "!==" to "!(...===...)"
author | thomask |
---|---|
date | Wed, 08 Jun 2005 17:49:15 +0000 |
parents | f842e680b6fb |
children | 7e8e5013a030 |
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_01; 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(b.parent is a); return 0; }