-// x=disjoint "X" new X()
-// y=disjoint "Y" new Y()
-// x.f=y
-// z=x
-// a=z.f
-// x.f=g
-//
-// What is B(a)?
-
-
-public class X extends Y {
- public Y f;
- public X() {}
-}
-
-public class Y {
- public Y() {}
-}
public class Foo {
public Foo f;
+ public Foo g;
public Foo() {}
}
public class Test {
static public void main( String[] args ) {
- /*
- X x;
- X z;
- Y y;
- Y a;
- X b = new X();
- Y g = new Y();
-
- x=disjoint X new X();
- y=disjoint Y new Y();
- x.f=y;
- z=x;
- a=z.f;
- b.f=a;
- x.f=g;
- */
- otherThing();
+ Foo a = disjoint A new Foo();
+ Foo b = disjoint B new Foo();
+ Foo c = disjoint C new Foo();
+
+ Foo q = disjoint Q new Foo();
+
+ while( false ) {
+ york( a, b, c );
+ a.g = q;
+ b.g = q;
+ }
}
- static public void otherThing() {
- Foo a = disjoint a new Foo();
- Foo b = disjoint b new Foo();
- Foo c = disjoint c new Foo();
+ static public void york( Foo p1, Foo p2, Foo p3 ) {
+ p3.f = new Foo();
- b.f = c;
- a.f = c;
- c = null;
+ carolina( p1 );
}
+
+ static public void carolina( Foo p1 ) {
+ Foo z = disjoint Z new Foo();
+
+ p1.f = z;
+ }
+
}