4ec6d2ab2a8f9217564ae4b0aaaa473aca149f44
[IRC.git] / Robust / src / Tests / disjoint / taintTest1 / test.java
1 public class Foo {
2   public Foo() {}
3   public Foo f;
4   public Foo g;
5 }
6
7 public class Test {
8
9   static public void main( String[] args ) {
10
11     Foo a = new Foo();
12     Foo b = new Foo();
13
14     /*
15     if( false ) {
16       a = new Foo();
17     }
18     */
19
20     rblock r1 {
21       a.f = new Foo();
22
23       b.f = new Foo();
24
25       doSomething( a, b );
26     }
27    
28   }
29
30   static void doSomething( Foo a, Foo b ) {
31
32     a.g = new Foo();
33
34     a.f.f = a.g;
35
36     Foo f = doStuff( a, b );
37   }   
38
39   static Foo doStuff( Foo m, Foo n ) {
40
41     m.f.g = n.f;
42
43     return new Foo();
44   }
45 }